From e7e5d031b210fa10644fcc65c4490d2565ee3f1d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 12 Dec 2021 10:49:38 -0800 Subject: [PATCH] Debugger: Fix crash on ill-timed breakpoint update. --- Windows/Debugger/Debugger_Lists.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Windows/Debugger/Debugger_Lists.cpp b/Windows/Debugger/Debugger_Lists.cpp index b60ed587d1..8870362516 100644 --- a/Windows/Debugger/Debugger_Lists.cpp +++ b/Windows/Debugger/Debugger_Lists.cpp @@ -401,11 +401,11 @@ void CtrlBreakpointList::removeBreakpoint(int itemIndex) } } -int CtrlBreakpointList::getTotalBreakpointCount() -{ - int count = (int)CBreakPoints::GetMemChecks().size(); - for (size_t i = 0; i < CBreakPoints::GetBreakpoints().size(); i++) { - if (!displayedBreakPoints_[i].temporary) count++; +int CtrlBreakpointList::getTotalBreakpointCount() { + int count = (int)displayedMemChecks_.size(); + for (auto bp : displayedBreakPoints_) { + if (!bp.temporary) + ++count; } return count;