Skip to content

Commit

Permalink
XPM should deal with NULL input correctly (thanks, Nitz!).
Browse files Browse the repository at this point in the history
Fixes Bugzilla #2965.
  • Loading branch information
icculus committed May 26, 2015
1 parent a2b9ccd commit cad0c81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion IMG_xpm.c
Expand Up @@ -1007,8 +1007,12 @@ static SDL_Surface *load_xpm(char **xpm, SDL_RWops *src)
linebuf = NULL;
buflen = 0;

if (src)
if (src)
start = SDL_RWtell(src);
else {
error = "src is NULL";
goto done;
}

if (xpm)
xpmlines = &xpm;
Expand Down

0 comments on commit cad0c81

Please sign in to comment.