diff --git a/src/thread/n3ds/SDL_syssem.c b/src/thread/n3ds/SDL_syssem.c index 4bee6563a..82fc2d3ec 100644 --- a/src/thread/n3ds/SDL_syssem.c +++ b/src/thread/n3ds/SDL_syssem.c @@ -113,7 +113,8 @@ Uint32 SDL_SemValue(SDL_sem *sem) { if (sem == NULL) { - return SDL_InvalidParamError("sem"); + SDL_InvalidParamError("sem"); + return 0; } return sem->semaphore.current_count; } diff --git a/src/thread/ngage/SDL_sysmutex.cpp b/src/thread/ngage/SDL_sysmutex.cpp index 3f0dd0d18..ffac6c38b 100644 --- a/src/thread/ngage/SDL_sysmutex.cpp +++ b/src/thread/ngage/SDL_sysmutex.cpp @@ -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();