debugwin.c: avoid race condition where debugger window update request is made before debugger is initialised [Peter Ferrie]

This commit is contained in:
Peter Ferrie 2015-03-16 17:35:10 -07:00
parent a9a20f0889
commit 672ce6c666

View File

@ -154,7 +154,7 @@ void debugger_windows::wait_for_debugger(device_t &device, bool firststop)
void debugger_windows::debugger_update()
{
// if we're running live, do some checks
if (!winwindow_has_focus() && !debug_cpu_is_stopped(*m_machine) && (m_machine->phase() == MACHINE_PHASE_RUNNING))
if (!winwindow_has_focus() && m_machine && !debug_cpu_is_stopped(*m_machine) && (m_machine->phase() == MACHINE_PHASE_RUNNING))
{
// see if the interrupt key is pressed and break if it is
if (seq_pressed())