From 06202e2badd1c519c62defe820094e28f6708d5e Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 11 Nov 2003 12:04:47 +0000 Subject: [PATCH] dont scale images to 0 px wide or tall --- render/image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/render/image.c b/render/image.c index 10aa9b13..393afe84 100644 --- a/render/image.c +++ b/render/image.c @@ -139,6 +139,9 @@ void RrImageDraw(RrPixel32 *target, RrTextureRGBA *rgba, dw = (gint)(dh * ((gdouble)sw / sh)); } + if (!(dw && dh)) + return; /* XXX sanity check */ + if (sw != dw || sh != dh) { /*if (!(rgba->cache && dw == rgba->cwidth && dh == rgba->cheight))*/ { g_free(rgba->cache); -- 2.45.2