Fixed memory leak in the pen cleanup

Fixes https://github.com/libsdl-org/SDL/issues/12099
This commit is contained in:
Sam Lantinga 2025-02-04 23:49:12 -08:00
parent c4c185283f
commit 2cd2834dfe
1 changed files with 5 additions and 0 deletions

View File

@ -4294,7 +4294,9 @@ void SDL_VideoQuit(void)
}
// Halt event processing before doing anything else
#if 0 // This was moved to the end to fix a memory leak
SDL_QuitPen();
#endif
SDL_QuitTouch();
SDL_QuitMouse();
SDL_QuitKeyboard();
@ -4325,6 +4327,9 @@ void SDL_VideoQuit(void)
}
_this->free(_this);
_this = NULL;
// This needs to happen after the video subsystem has removed pen data
SDL_QuitPen();
}
bool SDL_GL_LoadLibrary(const char *path)