Really fix -debug -cheat crash this time, nw

This commit is contained in:
therealmogminer@gmail.com 2016-08-27 20:52:32 +02:00
parent e97f55dd67
commit 90b6c12423

View File

@ -80,6 +80,7 @@
#include "ui/menu.h"
#include "cheat.h"
#include "debug/debugcpu.h"
#include "debugger.h"
#include <ctype.h>
@ -1081,10 +1082,13 @@ cheat_manager::cheat_manager(running_machine &machine)
if ((machine.debug_flags & DEBUG_FLAG_ENABLED) == 0)
{
m_cpu = std::make_unique<debugger_cpu>(machine);
// configure for memory access (shared with debugger)
m_cpu->configure_memory(m_symtable);
}
else
{
// configure for memory access (shared with debugger)
machine.debugger().cpu().configure_memory(m_symtable);
}
// load the cheats
reload();