| Summary: | SDL_UnlockMutex(SDL_EventQ.lock) in SDL_PeepEvents can cause error when lock is null | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ghassan Al-Mashareqa <kronikarz> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | All | ||
Fixed, thanks! https://hg.libsdl.org/SDL/rev/3e61babccbbe |
In general the SDL_EventQ.lock is handled a little bit differently wherever it shows up, sometimes it is checked for null, sometimes not, sometimes (like in SDL_PeepEvents) only when locking. SDL_PeepEvents: if (!SDL_EventQ.lock || SDL_LockMutex(SDL_EventQ.lock) == 0) { SDL_FlushEvents: if (SDL_LockMutex(SDL_EventQ.lock) == 0) { SDL_FilterEvents: if (SDL_EventQ.lock && SDL_LockMutex(SDL_EventQ.lock) == 0) {