MemoryView: Don't segfault if Core isn't running

There was a bug that caused MemoryView to indirectly cause a segfault;
the simplest way to reproduce it is 1) start a game; 2) stop the game;
3) click on the Refresh button and watch Dolphin segfault.

This commit fixes it by only calling PowerPC::HostIsRAMAddress when
emulation is running.
This commit is contained in:
Léo Lam 2016-10-03 23:45:02 +02:00
parent be6aeaad33
commit 6fba48cd15
1 changed files with 3 additions and 3 deletions

View File

@ -312,11 +312,11 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
dc.SetTextForeground(*wxBLACK);
}
if (!PowerPC::HostIsRAMAddress(address))
continue;
if (debugger->IsAlive())
{
if (!PowerPC::HostIsRAMAddress(address))
continue;
std::string dis;
u32 mem_data = debugger->ReadExtraMemory(memory, address);