summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Sincovici <smaryus@gmail.com>2019-12-25 20:02:11 +0100
committerMarius Sincovici <smaryus@gmail.com>2020-01-08 18:00:47 +0000
commit9165119819fe6a595c2a82b327ae67e597ffceba (patch)
tree953cf237c45467cfaa339b35b4a5e6c8016a8791
parent04b3c56a2be9b5233140619deaec1d46d2f85c22 (diff)
downloadqt-creator-9165119819fe6a595c2a82b327ae67e597ffceba.tar.gz
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>
-rw-r--r--src/plugins/debugger/debuggerengine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index a90c569c6d..86d4834b65 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -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);