src/render/SDL_render.c
changeset 9078 230e7558f76a
parent 8728 c7174f961388
child 9084 a8cbb653aea4
     1.1 --- a/src/render/SDL_render.c	Sat Aug 16 23:28:40 2014 -0700
     1.2 +++ b/src/render/SDL_render.c	Sat Aug 16 23:30:44 2014 -0700
     1.3 @@ -540,6 +540,10 @@
     1.4  
     1.5          /* Set up a destination surface for the texture update */
     1.6          dst_fmt = SDL_AllocFormat(format);
     1.7 +        if (!dst_fmt) {
     1.8 +           SDL_DestroyTexture(texture);
     1.9 +           return NULL;
    1.10 +        }
    1.11          temp = SDL_ConvertSurface(surface, dst_fmt, 0);
    1.12          SDL_FreeFormat(dst_fmt);
    1.13          if (temp) {