Skip to content

Commit

Permalink
Make XPM loader deal with NULL input correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed May 26, 2015
1 parent abc2877 commit 03ef44b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion IMG_xpm.c
Expand Up @@ -335,8 +335,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 03ef44b

Please sign in to comment.