mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-12-11 20:43:39 +00:00
Unlocking mutex in success case too
Without unlocking, we trigger an assertion failure in SDL_sysmutex.c at line 80 (i.e. 'rc == 0'). Each lock-unlock pair should ideally cancel each other out, maintaining a reference count that returns to zero.
This commit is contained in:
parent
2596482c3f
commit
4e3f35ccbf
@ -661,6 +661,7 @@ const SDL_PixelFormatDetails *SDL_GetPixelFormatDetails(SDL_PixelFormat format)
|
||||
}
|
||||
|
||||
if (SDL_FindInHashTable(SDL_format_details, (const void *)(uintptr_t)format, (const void **)&details)) {
|
||||
SDL_UnlockMutex(SDL_format_details_lock);
|
||||
return details;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user