From 4a0117af364a5aee2852e5bcfd66cb843082ee59 Mon Sep 17 00:00:00 2001 From: oxmox Date: Mon, 20 Feb 2023 00:06:28 +0100 Subject: [PATCH] fix crash due to logging during shutdown from class based DoomState Crash was double free in ImGui::AppendLog() during shutdown. Will have to disable the logging callback if logging should happen at that point. --- src/doompanning.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/doompanning.cc b/src/doompanning.cc index 5e4c19c..3711c68 100644 --- a/src/doompanning.cc +++ b/src/doompanning.cc @@ -46,11 +46,10 @@ struct DoomState // So easy to get this wrong and destroy the texture by accident. Cleanup is // now done in check_on_dooms() before erasing the state. Enabling this code // still works though. -#if 0 +#if 1 DoomState() = default; ~DoomState() { - log_trace("~DoomState"); if (texture) SDL_DestroyTexture(texture); }