aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2016-10-31 14:10:34 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2016-11-08 07:41:58 +0000
commitebac3b42903486830e1fd8935981ff3a32e9de1a (patch)
tree19d4bfb928c16756cc06e3f9be22c099bf9b5ce9
parenta9ce0f4228667dcaca0c7b8f6b54fd7ab588a0af (diff)
Executor: Only abort engine evaluation if engine is really evaluating
Otherwise, crashes in QtScript have been observed. Change-Id: I5ef716ce6577f68d548b16ed682013fdc75e4005 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/lib/corelib/buildgraph/executor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/executor.cpp b/src/lib/corelib/buildgraph/executor.cpp
index 8426547c4..e0f023c3d 100644
--- a/src/lib/corelib/buildgraph/executor.cpp
+++ b/src/lib/corelib/buildgraph/executor.cpp
@@ -1033,7 +1033,8 @@ void Executor::checkForCancellation()
QBS_ASSERT(m_progressObserver, return);
if (m_state == ExecutorRunning && m_progressObserver->canceled()) {
cancelJobs();
- m_evalContext->engine()->cancel();
+ if (m_evalContext->isActive())
+ m_evalContext->engine()->cancel();
}
}