mirror of
https://github.com/yawut/SDL.git
synced 2026-08-22 08:45:31 -05:00
Fixed crash when resizing YUV textures
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user