summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.cpp
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2017-07-25 11:08:10 +0100
committer smf- <smf-@users.noreply.github.com>2017-07-25 11:10:01 +0100
commit8a12dd4dc6be33022fea9d54bf5abfdac21e6179 (patch)
tree2a58f0890d267b57eaceb94b9d3e49dda814ef2d /src/emu/debug/debugcpu.cpp
parent1e4d09f33773cdc8a2a6f5550d851380bb3e054b (diff)
Don't assume a watch point exists for the address space passed to watchpoint_update_flags(), which fixes the hotspot command. (nw)
Diffstat (limited to 'src/emu/debug/debugcpu.cpp')
-rw-r--r--src/emu/debug/debugcpu.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index e682cbdafc6..43f1f60cd5c 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -2715,14 +2715,15 @@ void device_debug::watchpoint_update_flags(address_space &space)
// see if there are any enabled breakpoints
bool enablewrite = false;
- for (watchpoint *wp = m_wplist[space.spacenum()]; wp != nullptr; wp = wp->m_next)
- if (wp->m_enabled)
- {
- if (wp->m_type & WATCHPOINT_READ)
- enableread = true;
- if (wp->m_type & WATCHPOINT_WRITE)
- enablewrite = true;
- }
+ if (space.spacenum() < int(m_wplist.size()))
+ for (watchpoint *wp = m_wplist[space.spacenum()]; wp != nullptr; wp = wp->m_next)
+ if (wp->m_enabled)
+ {
+ if (wp->m_type & WATCHPOINT_READ)
+ enableread = true;
+ if (wp->m_type & WATCHPOINT_WRITE)
+ enablewrite = true;
+ }
// push the flags out globally
space.enable_read_watchpoints(enableread);