Fixed crash when resizing YUV textures
authorSam Lantinga <slouken@libsdl.org>
Sat, 20 Dec 2008 06:46:37 +0000
changeset 2882 04e89201f6ed
parent 2881 c8d203ef4335
child 2883 11626a53e7bc
Fixed crash when resizing YUV textures
src/video/x11/SDL_x11render.c
--- a/src/video/x11/SDL_x11render.c	Fri Dec 19 09:15:59 2008 +0000
+++ b/src/video/x11/SDL_x11render.c	Sat Dec 20 06:46:37 2008 +0000
@@ -643,6 +643,7 @@
         }
 
         /* Set up fake surfaces for SDL_SoftStretch() */
+        SDL_zero(src);
         src.format = &fmt;
         src.w = texture->w;
         src.h = texture->h;
@@ -654,6 +655,7 @@
             src.pixels = texturedata->pixels;
         src.pitch = texturedata->pitch;
 
+        SDL_zero(dst);
         dst.format = &fmt;
         dst.w = image->width;
         dst.h = image->height;