Qt: Fix potential crash on close with debugger open

This commit is contained in:
Vicki Pfau 2025-05-20 00:48:53 -07:00
parent 00074fac7d
commit 2cab5f1705

View File

@ -48,7 +48,7 @@ void DebuggerConsoleController::detach() {
{
CoreController::Interrupter interrupter(m_gameController);
QMutexLocker lock(&m_mutex);
if (m_cliDebugger.d.p->state != DEBUGGER_SHUTDOWN) {
if (m_cliDebugger.d.p && m_cliDebugger.d.p->state != DEBUGGER_SHUTDOWN) {
m_lines.append(QString());
m_cond.wakeOne();
}