mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
Fixed error when SDL_LoadSurface_IO() is passed a NULL src
This commit is contained in:
@@ -3104,6 +3104,11 @@ void SDL_DestroySurface(SDL_Surface *surface)
|
||||
|
||||
SDL_Surface *SDL_LoadSurface_IO(SDL_IOStream *src, bool closeio)
|
||||
{
|
||||
CHECK_PARAM(!src) {
|
||||
SDL_InvalidParamError("src");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (SDL_IsBMP(src)) {
|
||||
return SDL_LoadBMP_IO(src, closeio);
|
||||
} else if (SDL_IsPNG(src)) {
|
||||
|
||||
Reference in New Issue
Block a user