thread: return -1 from SDL_SemWaitTimeout if semaphore is NULL
(cherry picked from commit f6db1aba66)
This commit is contained in:
1 parent
fcd7d658dc
commit
ee13e8c76b
3 files changed
+3
-6
No files matched your search
@@ -87,8 +87,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) {
|
||||
|
||||
@@ -82,8 +82,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) {
|
||||
|
||||
@@ -83,8 +83,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) {
|
||||
|
||||
Reference in new issue
Block a user