Fixed crash when resizing YUV textures

This commit is contained in:
Sam Lantinga
2008-12-20 06:46:37 +00:00
parent e0728d1927
commit a74cf87942

View File

@@ -643,6 +643,7 @@ X11_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
}
/* 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 @@ X11_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
src.pixels = texturedata->pixels;
src.pitch = texturedata->pitch;
SDL_zero(dst);
dst.format = &fmt;
dst.w = image->width;
dst.h = image->height;