#208 fixed memory leak in console history

This commit is contained in:
drian
2021-04-15 10:59:11 +02:00
parent 69b7ffc939
commit fb69c25d48
+5 -1
View File
@@ -566,7 +566,11 @@ void consolekey(int code, bool isdown, SDL_Keymod mod)
if(h)
{
h->run();
if(h->action && !storeinputcommand) history.drop();
if(h->action && !storeinputcommand)
{
delete h;
history.drop();
}
}
}
else if((code==SDLK_ESCAPE && !ignoreescup) || code== SDL_AC_BUTTON_RIGHT)