diff src/video/x11/SDL_x11render.c @ 2882:04e89201f6ed

Fixed crash when resizing YUV textures
author Sam Lantinga <slouken@libsdl.org>
date Sat, 20 Dec 2008 06:46:37 +0000
parents 36e312e0fac0
children 9dde605c7540
line wrap: on
line diff
--- 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;