IMG_tga.c
changeset 98 9f94c4674cc9
parent 97 e1161bd417c4
child 117 e613cf987897
     1.1 --- a/IMG_tga.c	Sun Jan 04 17:41:55 2004 +0000
     1.2 +++ b/IMG_tga.c	Sun Jan 04 22:04:38 2004 +0000
     1.3 @@ -107,6 +107,11 @@
     1.4      Uint32 pixel;
     1.5      int count, rep;
     1.6  
     1.7 +    if ( !src ) {
     1.8 +        /* The error message has been set in SDL_RWFromFile */
     1.9 +        return NULL;
    1.10 +    }
    1.11 +
    1.12      if(!SDL_RWread(src, &hdr, sizeof(hdr), 1))
    1.13  	goto error;
    1.14      ncols = LE16(hdr.cmap_len);