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,7 +1914,7 @@ void DebuggerPluginPrivate::onCurrentProjectChanged(Project *project)
|
|||||||
for (int i = 0, n = m_snapshotHandler->size(); i != n; ++i) {
|
for (int i = 0, n = m_snapshotHandler->size(); i != n; ++i) {
|
||||||
// Run controls might be deleted during exit.
|
// Run controls might be deleted during exit.
|
||||||
if (DebuggerEngine *engine = m_snapshotHandler->at(i)) {
|
if (DebuggerEngine *engine = m_snapshotHandler->at(i)) {
|
||||||
DebuggerRunControl *runControl = engine->runControl();
|
if (DebuggerRunControl *runControl = engine->runControl()) {
|
||||||
RunConfiguration *rc = runControl->runConfiguration();
|
RunConfiguration *rc = runControl->runConfiguration();
|
||||||
if (rc == activeRc) {
|
if (rc == activeRc) {
|
||||||
m_snapshotHandler->setCurrentIndex(i);
|
m_snapshotHandler->setCurrentIndex(i);
|
||||||
@@ -1923,6 +1923,7 @@ void DebuggerPluginPrivate::onCurrentProjectChanged(Project *project)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If we have a running debugger, don't touch it.
|
// If we have a running debugger, don't touch it.
|
||||||
if (m_snapshotHandler->size())
|
if (m_snapshotHandler->size())
|
||||||
|
Reference in New Issue
Block a user