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); } }