mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
Fix crash when stopping emulation while the JIT widget is in use
The call to analyzer.Analyze breaks when it attempts to read an instruction, as it eventually tries to read memory when Memory::m_pRAM is nullptr. Trying to read when execution is not paused in general seems like a bad idea (especially as analyzer.Analyze uses PowerPC::TryReadInstruction which can update icache - this is probably still a problem).
This commit is contained in:
parent
7cd9a78ebf
commit
4f4bd57fe9
@ -12,6 +12,7 @@
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "Common/GekkoDisassembler.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/PowerPC/PPCAnalyst.h"
|
||||
#include "UICommon/Disassembler.h"
|
||||
|
||||
@ -130,7 +131,7 @@ void JITWidget::Update()
|
||||
if (!isVisible())
|
||||
return;
|
||||
|
||||
if (!m_address)
|
||||
if (!m_address || (Core::GetState() != Core::State::Paused))
|
||||
{
|
||||
m_ppc_asm_widget->setHtml(QStringLiteral("<i>%1</i>").arg(tr("(ppc)")));
|
||||
m_host_asm_widget->setHtml(QStringLiteral("<i>%1</i>").arg(tr("(host)")));
|
||||
|
Loading…
Reference in New Issue
Block a user