forked from qt-creator/qt-creator
Debugger: Check if m_perspective is valid before using it
When debugging a remote machine using ssh, if the ssh connection returns an error before other workers are fully started, and it will call destroyPerspective(). Then the other workers will call setState() when they are in EngineSetupOk and then in EngineRunRequested. Before calling select() method check if m_perspective is valid. Fixes: QTCREATORBUG-23415 Change-Id: Ib174015b1d11cdaa5f59e7ccb012b849d49672f1 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
@@ -1828,7 +1828,8 @@ void DebuggerEngine::setState(DebuggerState state, bool forced)
|
||||
|
||||
if (state == EngineRunRequested) {
|
||||
emit engineStarted();
|
||||
d->m_perspective->select();
|
||||
if (d->m_perspective)
|
||||
d->m_perspective->select();
|
||||
}
|
||||
|
||||
showMessage(msg, LogDebug);
|
||||
|
Reference in New Issue
Block a user