From 48085f0f484ed3a141aa938ad7af7db683182673 Mon Sep 17 00:00:00 2001 From: sonoftunk Date: Mon, 14 Nov 2022 18:55:57 -0500 Subject: [PATCH] Check Tracker - Fixes an issue where any time an item is removed the tracker would cause an application crash --- soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp index 2377767c0..76db4dbb5 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp @@ -844,9 +844,9 @@ void DrawLocations() { // If the location has its scene flag set if (!inGame || (!checked && !skipped)) { // show it as unchecked - if (!checked) + if (!checked && elfound != checkedLocations.end()) checkedLocations.erase(elfound); - if (!skipped) + if (!skipped && skfound != skippedLocations.end()) skippedLocations.erase(skfound); } else if (skipped && ImGui::ArrowButton(std::to_string(locationIt.second.rc).c_str(), ImGuiDir_Left)) { if (skipped)