]> Dogcows Code - chaz/openbox/commitdiff
dont scale images to 0 px wide or tall
authorDana Jansens <danakj@orodu.net>
Tue, 11 Nov 2003 12:04:47 +0000 (12:04 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 11 Nov 2003 12:04:47 +0000 (12:04 +0000)
render/image.c

index 10aa9b13017cc89ab630a39b87c04930a8c4ea4e..393afe84973babece9e74a974ae9104992323b32 100644 (file)
@@ -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);
This page took 0.026251 seconds and 4 git commands to generate.