Qt: Fix crash entering commands into detached debugger (fixes #2987)

This commit is contained in:
Vicki Pfau 2023-08-06 22:38:39 -07:00
parent 1bb8d52e16
commit 0cd50cae8c
1 changed files with 1 additions and 1 deletions

View File

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