Merge pull request #655 from lioncash/crashes

Fix two possible crashes related to the debugger.
This commit is contained in:
Matthew Parlane 2014-07-23 21:24:03 +12:00
commit 008b907bf0
2 changed files with 7 additions and 1 deletions

View File

@ -30,7 +30,7 @@ namespace PowerPC
// STATE_TO_SAVE
PowerPCState GC_ALIGNED16(ppcState);
static volatile CPUState state = CPU_STEPPING;
static volatile CPUState state = CPU_POWERDOWN;
Interpreter * const interpreter = Interpreter::getInstance();
static CoreMode mode;

View File

@ -160,6 +160,12 @@ void CMemoryWindow::JumpToAddress(u32 _Address)
void CMemoryWindow::SetMemoryValue(wxCommandEvent& event)
{
if (!Memory::IsInitialized())
{
PanicAlertT("Cannot set uninitialized memory.");
return;
}
std::string str_addr = WxStrToStr(addrbox->GetValue());
std::string str_val = WxStrToStr(valbox->GetValue());
u32 addr;