Commit ca7297668a88109c8ddfe8340ba6db2f8022c105

Sam Lantinga 2017-12-12T16:10:20

Fixed bug 3996 - Corrupted or over-released critical section on SDL_Quit (SDL_event_watchers_lock) Andrew This likely comes down to an additional 'unlock' being called before destroying it, without a matching 'lock'.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c
index 777c273..fe8e449 100644
--- a/src/events/SDL_events.c
+++ b/src/events/SDL_events.c
@@ -369,7 +369,6 @@ SDL_StopEventLoop(void)
     }
 
     if (SDL_event_watchers_lock) {
-        SDL_UnlockMutex(SDL_event_watchers_lock);
         SDL_DestroyMutex(SDL_event_watchers_lock);
         SDL_event_watchers_lock = NULL;
     }