Commit 8a4b0aea authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Debugger: Fix crash on shutdown



If the application fails to start (like an empty exe file), the debugger
remains in "active" state, and it crashes on shutdown.

Change-Id: I6ae3a98d507856ea40375edb15c9ea4605e3efc6
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 43cc4994
......@@ -1914,12 +1914,13 @@ void DebuggerPluginPrivate::onCurrentProjectChanged(Project *project)
for (int i = 0, n = m_snapshotHandler->size(); i != n; ++i) {
// Run controls might be deleted during exit.
if (DebuggerEngine *engine = m_snapshotHandler->at(i)) {
DebuggerRunControl *runControl = engine->runControl();
RunConfiguration *rc = runControl->runConfiguration();
if (rc == activeRc) {
m_snapshotHandler->setCurrentIndex(i);
updateState(engine);
return;
if (DebuggerRunControl *runControl = engine->runControl()) {
RunConfiguration *rc = runControl->runConfiguration();
if (rc == activeRc) {
m_snapshotHandler->setCurrentIndex(i);
updateState(engine);
return;
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment