diff options
author | Christian Stenger <christian.stenger@theqtcompany.com> | 2016-04-04 09:15:28 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@theqtcompany.com> | 2016-04-05 10:21:03 +0000 |
commit | 40b6413201ac5b6f53fd4508085f760585b0d742 (patch) | |
tree | 17e3a66f7d8c5911a0e590dbdfc3cf3f4b5473b5 /src/plugins/debugger | |
parent | 27063480407a263ba4438d22751b7c09356426d3 (diff) | |
download | qt-creator-40b6413201ac5b6f53fd4508085f760585b0d742.tar.gz |
Debugger: Fix crash on close while debugging
Task-number: QTCREATORBUG-15987
Change-Id: I510add216ec16c0c6622870f26c68c16e99769ed
Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 6 | ||||
-rw-r--r-- | src/plugins/debugger/debuggerruncontrol.cpp | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 654f9e2b01..3ac268c8b6 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -2502,6 +2502,8 @@ void DebuggerPluginPrivate::setInitialState() void DebuggerPluginPrivate::updateState(DebuggerEngine *engine) { + if (m_shuttingDown) + return; QTC_ASSERT(engine, return); QTC_ASSERT(m_watchersView->model(), return); QTC_ASSERT(m_returnView->model(), return); @@ -2647,6 +2649,8 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine) void DebuggerPluginPrivate::updateDebugActions() { + if (m_shuttingDown) + return; //if we're currently debugging the actions are controlled by engine if (m_currentEngine->state() != DebuggerNotReady) return; @@ -2775,6 +2779,8 @@ QTreeView *inspectorView() void DebuggerPluginPrivate::showMessage(const QString &msg, int channel, int timeout) { + if (m_shuttingDown) + return; //qDebug() << "PLUGIN OUTPUT: " << channel << msg; QTC_ASSERT(m_logWindow, return); switch (channel) { diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index 954539cd19..fab12a1920 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -232,8 +232,11 @@ bool DebuggerRunControl::promptToStop(bool *optionalPrompt) const "Terminating the session in the current" " state can leave the target in an inconsistent state." " Would you still like to terminate it?"); - return showPromptToStopDialog(tr("Close Debugging Session"), question, - QString(), QString(), optionalPrompt); + bool result = showPromptToStopDialog(tr("Close Debugging Session"), question, + QString(), QString(), optionalPrompt); + if (result) + disconnect(this); + return result; } RunControl::StopResult DebuggerRunControl::stop() |