From efdb0cb119ea8f418c3cb0232b27aab6d06a2329 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Tue, 1 Jul 2025 14:26:01 -0400 Subject: [PATCH] Just use get_if here instead. --- gui/map_view.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gui/map_view.cpp b/gui/map_view.cpp index 06af275..c583ceb 100644 --- a/gui/map_view.cpp +++ b/gui/map_view.cpp @@ -73,14 +73,13 @@ namespace gui { } void MapViewUI::update() { - if($gui.has($log_to)) { - auto& text = $gui.get($log_to); + if(auto text = $gui.get_if($log_to)) { //BUG: I'm calling this what it is, fix it wstring log_garbage; for(auto msg : $messages) { log_garbage += msg + L"\n"; } - text.update(log_garbage); + text->update(log_garbage); } }