diff --git a/src/plugins/git/branchdialog.cpp b/src/plugins/git/branchdialog.cpp
index 11459f3a31efa4a5ed9b76469555380d24317f35..2e299511e35e8aea17afccd1d7ef77baf2a9816c 100644
--- a/src/plugins/git/branchdialog.cpp
+++ b/src/plugins/git/branchdialog.cpp
@@ -193,8 +193,8 @@ void BranchDialog::checkout()
     } else if (branchCheckoutDialog.exec() == QDialog::Accepted && m_model) {
 
         if (branchCheckoutDialog.makeStashOfCurrentBranch()) {
-            if (!gitClient->executeSynchronousStash(m_repository,
-                            currentBranch + QLatin1String("-AutoStash"))) {
+            if (gitClient->synchronousStash(m_repository,
+                           currentBranch + QLatin1String("-AutoStash")).isEmpty()) {
                 return;
             }
         } else if (branchCheckoutDialog.moveLocalChangesToNextBranch()) {