thread: return -1 from SDL_SemWaitTimeout if semaphore is NULL

This commit is contained in:
pionere 2022-11-29 09:46:20 +01:00 committed by Ryan C. Gordon
parent 6875e1c262
commit f6db1aba66
3 changed files with 3 additions and 6 deletions

View file

@ -85,8 +85,7 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
InitializeTimerAlarm(&alarm);
if (sem == NULL) {
SDL_InvalidParamError("sem");
return 0;
return SDL_InvalidParamError("sem");
}
if (timeout == 0) {

View file

@ -80,8 +80,7 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
int res;
if (sem == NULL) {
SDL_InvalidParamError("sem");
return 0;
return SDL_InvalidParamError("sem");
}
if (timeout == 0) {

View file

@ -81,8 +81,7 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
unsigned int res;
if (sem == NULL) {
SDL_InvalidParamError("sem");
return 0;
return SDL_InvalidParamError("sem");
}
if (timeout == 0) {