mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-15 14:26:01 +00:00
use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError
This commit is contained in:
@@ -78,7 +78,7 @@ SDL_LockMutex(SDL_mutex * mutex)
|
||||
SDL_threadID this_thread;
|
||||
|
||||
if (mutex == NULL) {
|
||||
return SDL_SetError("Passed a NULL mutex");
|
||||
return SDL_InvalidParamError("mutex");
|
||||
}
|
||||
|
||||
this_thread = SDL_ThreadID();
|
||||
@@ -109,7 +109,7 @@ SDL_TryLockMutex(SDL_mutex * mutex)
|
||||
SDL_threadID this_thread;
|
||||
|
||||
if (mutex == NULL) {
|
||||
return SDL_SetError("Passed a NULL mutex");
|
||||
return SDL_InvalidParamError("mutex");
|
||||
}
|
||||
|
||||
this_thread = SDL_ThreadID();
|
||||
@@ -139,7 +139,7 @@ SDL_mutexV(SDL_mutex * mutex)
|
||||
return 0;
|
||||
#else
|
||||
if (mutex == NULL) {
|
||||
return SDL_SetError("Passed a NULL mutex");
|
||||
return SDL_InvalidParamError("mutex");
|
||||
}
|
||||
|
||||
/* If we don't own the mutex, we can't unlock it */
|
||||
|
Reference in New Issue
Block a user