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.
This commit is contained in:
oxmox 2023-02-20 00:06:28 +01:00
parent 1a0c22ae09
commit 888e9459c5

View file

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