Selaa lähdekoodia

Fix crash when the disassembler pause button is pressed while no game is running.

xdec 11 vuotta sitten
vanhempi
commit
8de09d87ab
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      src/citra_qt/debugger/disassembler.cpp

+ 3 - 1
src/citra_qt/debugger/disassembler.cpp

@@ -220,7 +220,9 @@ void DisassemblerWidget::OnPause()
     emu_thread.SetCpuRunning(false);
     emu_thread.SetCpuRunning(false);
 
 
     // TODO: By now, the CPU might not have actually stopped...
     // TODO: By now, the CPU might not have actually stopped...
-    model->SetNextInstruction(Core::g_app_core->GetPC());
+    if (model && Core::g_app_core) {
+        model->SetNextInstruction(Core::g_app_core->GetPC());
+    }
 }
 }
 
 
 void DisassemblerWidget::OnToggleStartStop()
 void DisassemblerWidget::OnToggleStartStop()