src/render/SDL_render.c
changeset 9636 ac8cd6c6d966
parent 9619 b94b6d0bff0f
child 9673 aea5a2032785
     1.1 --- a/src/render/SDL_render.c	Tue May 26 16:31:11 2015 -0400
     1.2 +++ b/src/render/SDL_render.c	Tue May 26 16:42:36 2015 -0400
     1.3 @@ -820,7 +820,9 @@
     1.4          rect = &full_rect;
     1.5      }
     1.6  
     1.7 -    if (texture->yuv) {
     1.8 +    if ((rect->w == 0) || (rect->h == 0)) {
     1.9 +        return 0;  /* nothing to do. */
    1.10 +    } else if (texture->yuv) {
    1.11          return SDL_UpdateTextureYUV(texture, rect, pixels, pitch);
    1.12      } else if (texture->native) {
    1.13          return SDL_UpdateTextureNative(texture, rect, pixels, pitch);