IMG_tif.c
changeset 492 915de300a9a9
parent 490 fd7214657669
child 493 b6f8fbe5a386
     1.1 --- a/IMG_tif.c	Mon Feb 15 08:44:43 2016 -0800
     1.2 +++ b/IMG_tif.c	Tue Nov 01 10:36:59 2016 -0700
     1.3 @@ -204,7 +204,7 @@
     1.4  SDL_Surface* IMG_LoadTIF_RW(SDL_RWops* src)
     1.5  {
     1.6      Sint64 start;
     1.7 -    TIFF* tiff;
     1.8 +    TIFF* tiff = NULL;
     1.9      SDL_Surface* surface = NULL;
    1.10      Uint32 img_width, img_height;
    1.11      Uint32 Rmask, Gmask, Bmask, Amask;
    1.12 @@ -263,9 +263,12 @@
    1.13  
    1.14  error:
    1.15      SDL_RWseek(src, start, RW_SEEK_SET);
    1.16 -    if ( surface ) {
    1.17 +    if (surface) {
    1.18          SDL_FreeSurface(surface);
    1.19      }
    1.20 +    if (tiff) {
    1.21 +        lib.TIFFClose(tiff);
    1.22 +    }
    1.23      return NULL;
    1.24  }
    1.25