mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-22 19:18:30 +00:00
Fixed memory leak if logging is done after SDL_Quit()
If someone calls SDL_Quit(), then runs an SDL function that implicitly initializes TLS or logging, and then calls SDL_Quit() again, we want to make sure we run through the quit process again. Each of the Init/Quit calls are protected against being called multiple times.
This commit is contained in:
@@ -118,6 +118,7 @@ void SDL_InitLog(void)
|
||||
void SDL_QuitLog(void)
|
||||
{
|
||||
SDL_ResetLogPriorities();
|
||||
|
||||
if (log_function_mutex) {
|
||||
SDL_DestroyMutex(log_function_mutex);
|
||||
log_function_mutex = NULL;
|
||||
|
Reference in New Issue
Block a user