Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fix double free when destroying event thread for a second time.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbens committed Jul 11, 2009
1 parent 8f8d459 commit c09893d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/events/SDL_events.c
Expand Up @@ -196,7 +196,10 @@ SDL_StopEventThread(void)
SDL_DestroyMutex(SDL_EventLock.lock);
}
#ifndef IPOD
SDL_DestroyMutex(SDL_EventQ.lock);
if (SDL_EventQ.lock) {
SDL_DestroyMutex(SDL_EventQ.lock);
SDL_EventQ.lock = NULL;
}
#endif
}

Expand Down

0 comments on commit c09893d

Please sign in to comment.