mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-04 02:47:39 +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:
parent
82c89c0125
commit
f080336fa6
2 changed files with 1 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue