forked from qt-creator/qt-creator
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: hjk <hjk@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
43cc499409
commit
8a4b0aeabf
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user