From 0cd50cae8c5a57080c3cc2ad2c0c4378a659ef6f Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 6 Aug 2023 22:38:39 -0700 Subject: [PATCH] Qt: Fix crash entering commands into detached debugger (fixes #2987) --- src/platform/qt/DebuggerConsoleController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/qt/DebuggerConsoleController.cpp b/src/platform/qt/DebuggerConsoleController.cpp index 55d44a0ae..7d6624d77 100644 --- a/src/platform/qt/DebuggerConsoleController.cpp +++ b/src/platform/qt/DebuggerConsoleController.cpp @@ -38,7 +38,7 @@ void DebuggerConsoleController::enterLine(const QString& line) { CoreController::Interrupter interrupter(m_gameController); QMutexLocker lock(&m_mutex); m_lines.append(line); - if (m_cliDebugger.d.p->state == DEBUGGER_RUNNING) { + if (m_cliDebugger.d.p && m_cliDebugger.d.p->state == DEBUGGER_RUNNING) { mDebuggerEnter(m_cliDebugger.d.p, DEBUGGER_ENTER_MANUAL, nullptr); } m_cond.wakeOne();