diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index ae94d872243..76eca0b6652 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -342,7 +342,15 @@ void QMakeStep::startOneCommand(const QString &command, const QString &args) void QMakeStep::runNextCommand() { - bool wasSuccess = m_commandFuture ? m_commandFuture->future().result() : true; + bool wasSuccess = true; + if (m_commandFuture) { + if (m_commandFuture->isCanceled()) + wasSuccess = false; + else if (m_commandFuture->isFinished()) + wasSuccess = m_commandFuture->future().result(); + else + wasSuccess = false; // should not happen + } delete m_commandFuture; m_commandFuture = nullptr;