From 8de09d87ab529f6f9525b784de4343b7aa4d6bf9 Mon Sep 17 00:00:00 2001 From: xdec Date: Sun, 28 Dec 2014 01:56:07 -0800 Subject: Fix crash when the disassembler pause button is pressed while no game is running. --- src/citra_qt/debugger/disassembler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/citra_qt/debugger/disassembler.cpp b/src/citra_qt/debugger/disassembler.cpp index 2ee877743..159f4d65e 100644 --- a/src/citra_qt/debugger/disassembler.cpp +++ b/src/citra_qt/debugger/disassembler.cpp @@ -220,7 +220,9 @@ void DisassemblerWidget::OnPause() emu_thread.SetCpuRunning(false); // 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() -- cgit v1.2.3 From e6162ed91e29c356af1007f9b9545d4d076570c9 Mon Sep 17 00:00:00 2001 From: xdec Date: Sun, 28 Dec 2014 10:11:51 -0800 Subject: Qt: we don't need to check if model is valid. --- src/citra_qt/debugger/disassembler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/citra_qt/debugger/disassembler.cpp b/src/citra_qt/debugger/disassembler.cpp index 159f4d65e..14745f3bb 100644 --- a/src/citra_qt/debugger/disassembler.cpp +++ b/src/citra_qt/debugger/disassembler.cpp @@ -220,7 +220,7 @@ void DisassemblerWidget::OnPause() emu_thread.SetCpuRunning(false); // TODO: By now, the CPU might not have actually stopped... - if (model && Core::g_app_core) { + if (Core::g_app_core) { model->SetNextInstruction(Core::g_app_core->GetPC()); } } -- cgit v1.2.3