mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
Fixed error when SDL_LoadSurface_IO() is passed a NULL src
(cherry picked from commit 1d081314a8)
This commit is contained in:
parent
8fa310e162
commit
86c664d695
1 changed files with 5 additions and 0 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue