mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-23 19:48:29 +00:00
os2: SDL_DestroyMutex should ignore NULL mutexes.
Every other backend does this, so this should match, now. It's possible this was harmless, but we can avoid the system call and the (likely?) debug message when it fails, though!
This commit is contained in:
@@ -56,13 +56,13 @@ SDL_CreateMutex(void)
|
|||||||
void
|
void
|
||||||
SDL_DestroyMutex(SDL_mutex * mutex)
|
SDL_DestroyMutex(SDL_mutex * mutex)
|
||||||
{
|
{
|
||||||
ULONG ulRC;
|
|
||||||
HMTX hMtx = (HMTX)mutex;
|
HMTX hMtx = (HMTX)mutex;
|
||||||
|
if (hMtx != NULLHANDLE) {
|
||||||
ulRC = DosCloseMutexSem(hMtx);
|
const ULONG ulRC = DosCloseMutexSem(hMtx);
|
||||||
if (ulRC != NO_ERROR) {
|
if (ulRC != NO_ERROR) {
|
||||||
debug_os2("DosCloseMutexSem(), rc = %u", ulRC);
|
debug_os2("DosCloseMutexSem(), rc = %u", ulRC);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Lock the mutex */
|
/* Lock the mutex */
|
||||||
|
Reference in New Issue
Block a user