X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=render%2Fimage.c;h=393afe84973babece9e74a974ae9104992323b32;hb=5c95d2ffeabe45a6aacf37d0a1c1b0dfe83b2ba5;hp=10aa9b13017cc89ab630a39b87c04930a8c4ea4e;hpb=740c5b2a20d5110435d0874f8cc6a4c9dfd14777;p=chaz%2Fopenbox 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);