diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 1353f2dec5c29c9feb2137e67a313fda977718b1..ce7c9d13fa88358cad86a531317a8b6ffc303bcb 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -2049,7 +2049,13 @@ void ProjectExplorerPluginPrivate::executeRunConfiguration(RunConfiguration *run
 
     QTC_ASSERT(producer, return);
     auto runControl = new RunControl(runConfiguration, runMode);
-    (void) producer(runControl);
+
+    // A user needed interaction may have cancelled the run
+    // (by example asking for a process pid or server url).
+    if (!producer(runControl)) {
+        delete runControl;
+        return;
+    }
 
     emit m_instance->aboutToExecuteProject(runConfiguration->target()->project(), runMode);