forked from qt-creator/qt-creator
Debugger: Avoid crash when settings change after debugging
If the debugger engine is not running there is anyway no need to update its data. Change-Id: I8cda9218985db8b88d96046254847e8916ca37eb Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -2138,6 +2138,10 @@ void DebuggerEngine::createSnapshot()
|
||||
|
||||
void DebuggerEngine::updateLocals()
|
||||
{
|
||||
// if the engine is not running - do nothing
|
||||
if (state() == DebuggerState::DebuggerFinished || state() == DebuggerState::DebuggerNotReady)
|
||||
return;
|
||||
|
||||
watchHandler()->resetValueCache();
|
||||
doUpdateLocals(UpdateParameters());
|
||||
}
|
||||
|
@@ -3302,6 +3302,10 @@ void GdbEngine::handlePeripheralRegisterListValues(
|
||||
|
||||
void GdbEngine::reloadLocals()
|
||||
{
|
||||
// if the engine is not running - do nothing
|
||||
if (state() == DebuggerState::DebuggerFinished || state() == DebuggerState::DebuggerNotReady)
|
||||
return;
|
||||
|
||||
setTokenBarrier();
|
||||
updateLocals();
|
||||
}
|
||||
|
Reference in New Issue
Block a user