mirror of
https://github.com/encounter/SDL.git
synced 2025-12-10 14:07:50 +00:00
Fixed bug 3702 - Clear error messages of SDL_LoadObject for optional libraries
Simon Hug Some code in SDL loads libraries with SDL_LoadObject to get more information or use newer APIs. SDL_LoadObject may fail, set an error message and SDL will continue with some fallback code. Since SDL will overwrite the error or exit the function with a return value that indicates success, the error form SDL_LoadObject for the optional stuff might as well be cleared right away.
This commit is contained in:
@@ -150,6 +150,7 @@ LoadLibSampleRate(void)
|
||||
SDL_assert(SRC_lib == NULL);
|
||||
SRC_lib = SDL_LoadObject(SDL_LIBSAMPLERATE_DYNAMIC);
|
||||
if (!SRC_lib) {
|
||||
SDL_ClearError();
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user