Debugger: Fix crash on close while debugging

Task-number: QTCREATORBUG-15987
Change-Id: I510add216ec16c0c6622870f26c68c16e99769ed
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Christian Stenger
2016-04-04 09:15:28 +02:00
parent 2706348040
commit 40b6413201
2 changed files with 11 additions and 2 deletions

View File

@@ -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()