diff --git a/sc2/src/sc2code/libs/graphics/sdl/canvas.c b/sc2/src/sc2code/libs/graphics/sdl/canvas.c index a81f8726e..93ad103d3 100644 --- a/sc2/src/sc2code/libs/graphics/sdl/canvas.c +++ b/sc2/src/sc2code/libs/graphics/sdl/canvas.c @@ -273,9 +273,9 @@ TFB_DrawCanvas_GetScaledExtent (TFB_Canvas src_canvas, int scale, PEXTENT size) SDL_Surface *src = (SDL_Surface *)src_canvas; size->width = (int) (src->w * scale / (float)GSCALE_IDENTITY); size->height = (int) (src->h * scale / (float)GSCALE_IDENTITY); - if (!size->width) + if (!size->width && src->w) size->width = 1; - if (!size->height) + if (!size->height && src->h) size->height = 1; }