thread: return -1 from SDL_SemWaitTimeout if semaphore is NULL
This commit is contained in:
1 parent
6875e1c262
commit
f6db1aba66
3 files changed
+3
-6
No files matched your search
@@ -85,8 +85,7 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
|
|||||||
InitializeTimerAlarm(&alarm);
|
InitializeTimerAlarm(&alarm);
|
||||||
|
|
||||||
if (sem == NULL) {
|
if (sem == NULL) {
|
||||||
SDL_InvalidParamError("sem");
|
return SDL_InvalidParamError("sem");
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeout == 0) {
|
if (timeout == 0) {
|
||||||
|
|||||||
@@ -80,8 +80,7 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
|
|||||||
int res;
|
int res;
|
||||||
|
|
||||||
if (sem == NULL) {
|
if (sem == NULL) {
|
||||||
SDL_InvalidParamError("sem");
|
return SDL_InvalidParamError("sem");
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeout == 0) {
|
if (timeout == 0) {
|
||||||
|
|||||||
@@ -81,8 +81,7 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
|
|||||||
unsigned int res;
|
unsigned int res;
|
||||||
|
|
||||||
if (sem == NULL) {
|
if (sem == NULL) {
|
||||||
SDL_InvalidParamError("sem");
|
return SDL_InvalidParamError("sem");
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeout == 0) {
|
if (timeout == 0) {
|
||||||
|
|||||||
Reference in new issue
Block a user