Skip to content

Commit

Permalink
Fixed SDL error when filtering events after shutdown.
Browse files Browse the repository at this point in the history
This can happen when restoring video modes during video system shutdown
  • Loading branch information
slouken committed May 31, 2014
1 parent f29ac39 commit 52222db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/events/SDL_events.c
Expand Up @@ -550,7 +550,7 @@ SDL_DelEventWatch(SDL_EventFilter filter, void *userdata)
void
SDL_FilterEvents(SDL_EventFilter filter, void *userdata)
{
if (SDL_LockMutex(SDL_EventQ.lock) == 0) {
if (SDL_EventQ.lock && SDL_LockMutex(SDL_EventQ.lock) == 0) {
SDL_EventEntry *entry, *next;
for (entry = SDL_EventQ.head; entry; entry = next) {
next = entry->next;
Expand Down

0 comments on commit 52222db

Please sign in to comment.