forked from qt-creator/qt-creator
QMake: Fix crash when canceling qmake run
Change-Id: I24d286210086bd85825b8fd300a69b4bb8778367 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user