src/video/SDL_surface.c
changeset 11448 52dcef74bdc5
parent 11289 ca3c2c98f2e1
child 11496 3d1698bc2747
     1.1 --- a/src/video/SDL_surface.c	Sun Sep 03 17:33:49 2017 -0400
     1.2 +++ b/src/video/SDL_surface.c	Mon Sep 04 11:46:14 2017 -0700
     1.3 @@ -1193,6 +1193,10 @@
     1.4      if (surface->flags & SDL_DONTFREE) {
     1.5          return;
     1.6      }
     1.7 +    if (surface->map != NULL) {
     1.8 +        SDL_FreeBlitMap(surface->map);
     1.9 +        surface->map = NULL;
    1.10 +    }
    1.11      if (--surface->refcount > 0) {
    1.12          return;
    1.13      }
    1.14 @@ -1207,10 +1211,6 @@
    1.15          SDL_FreeFormat(surface->format);
    1.16          surface->format = NULL;
    1.17      }
    1.18 -    if (surface->map != NULL) {
    1.19 -        SDL_FreeBlitMap(surface->map);
    1.20 -        surface->map = NULL;
    1.21 -    }
    1.22      if (!(surface->flags & SDL_PREALLOC)) {
    1.23          SDL_free(surface->pixels);
    1.24      }