diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-03-11 23:11:44 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-03-11 23:11:44 -0400 |
commit | 5a397a4587093b9044fdc5a38e5a61a78c0c9748 (patch) | |
tree | ba73c5be0016763c210b66f1aa06d0a61ef6e169 | |
parent | 009cfbee0c28bb9c80e305de4a9c430350d6dde6 (diff) | |
download | lingo-ap-tracker-5a397a4587093b9044fdc5a38e5a61a78c0c9748.tar.gz lingo-ap-tracker-5a397a4587093b9044fdc5a38e5a61a78c0c9748.tar.bz2 lingo-ap-tracker-5a397a4587093b9044fdc5a38e5a61a78c0c9748.zip |
Fix memory issues with ReportPopup
-rw-r--r-- | src/report_popup.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/report_popup.cpp b/src/report_popup.cpp index 7ceef0d..703e87f 100644 --- a/src/report_popup.cpp +++ b/src/report_popup.cpp | |||
@@ -36,6 +36,10 @@ void ReportPopup::Reset() { | |||
36 | } | 36 | } |
37 | 37 | ||
38 | void ReportPopup::ResetIndicators() { | 38 | void ReportPopup::ResetIndicators() { |
39 | if (door_id_ == -1) { | ||
40 | return; | ||
41 | } | ||
42 | |||
39 | wxFont the_font = GetFont().Scale(GetDPIScaleFactor()); | 43 | wxFont the_font = GetFont().Scale(GetDPIScaleFactor()); |
40 | const std::map<std::string, bool>& report = GetDoorRequirements(door_id_); | 44 | const std::map<std::string, bool>& report = GetDoorRequirements(door_id_); |
41 | 45 | ||
@@ -67,6 +71,10 @@ void ReportPopup::ResetIndicators() { | |||
67 | } | 71 | } |
68 | 72 | ||
69 | void ReportPopup::UpdateIndicators() { | 73 | void ReportPopup::UpdateIndicators() { |
74 | if (door_id_ == -1) { | ||
75 | return; | ||
76 | } | ||
77 | |||
70 | wxFont the_font = GetFont().Scale(GetDPIScaleFactor()); | 78 | wxFont the_font = GetFont().Scale(GetDPIScaleFactor()); |
71 | const std::map<std::string, bool>& report = GetDoorRequirements(door_id_); | 79 | const std::map<std::string, bool>& report = GetDoorRequirements(door_id_); |
72 | 80 | ||