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:
parent
e7c98a490e
commit
4a0117af36
1 changed files with 1 additions and 2 deletions
|
@ -46,11 +46,10 @@ struct DoomState
|
||||||
// So easy to get this wrong and destroy the texture by accident. Cleanup is
|
// 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
|
// now done in check_on_dooms() before erasing the state. Enabling this code
|
||||||
// still works though.
|
// still works though.
|
||||||
#if 0
|
#if 1
|
||||||
DoomState() = default;
|
DoomState() = default;
|
||||||
~DoomState()
|
~DoomState()
|
||||||
{
|
{
|
||||||
log_trace("~DoomState");
|
|
||||||
if (texture)
|
if (texture)
|
||||||
SDL_DestroyTexture(texture);
|
SDL_DestroyTexture(texture);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue