mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-23 22:41:56 +00:00
thread: fix inconsistent return values
- SDL_CreateMutex returns NULL when the creation fails (ngage) - SDL_SemValue returns 0 when the semaphore is NULL (n3ds)
This commit is contained in:
parent
b5076ef5e3
commit
6875e1c262
2 changed files with 3 additions and 1 deletions
|
|
@ -47,6 +47,7 @@ SDL_CreateMutex(void)
|
|||
TInt status = CreateUnique(NewMutex, &rmutex, NULL);
|
||||
if (status != KErrNone) {
|
||||
SDL_SetError("Couldn't create mutex.");
|
||||
return NULL;
|
||||
}
|
||||
SDL_mutex* mutex = new /*(ELeave)*/ SDL_mutex;
|
||||
mutex->handle = rmutex.Handle();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue