From f085b1859e6d0eccd407ee31bb6aa96b4a332e3f Mon Sep 17 00:00:00 2001 From: Alexander Sack Date: Sat, 31 Oct 2009 01:22:29 +0100 Subject: [PATCH] add assertion that height and width != 0 in clearlooks_draw_progressbar_fill (lp:460710) height/width in clearlooks_draw_progressbar_fill will lead to an infinite loop when processing the tiling. Since for the width/height == 0 cases there is not much to fill anyway, we can just skip the func if height/width have a zero value. --- engines/clearlooks/src/clearlooks_draw.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/engines/clearlooks/src/clearlooks_draw.c b/engines/clearlooks/src/clearlooks_draw.c index 94c194f..a7af9b6 100644 --- a/engines/clearlooks/src/clearlooks_draw.c +++ b/engines/clearlooks/src/clearlooks_draw.c @@ -877,6 +877,10 @@ clearlooks_draw_progressbar_fill (cairo_t *cr, CairoColor border; CairoColor shadow; + /* width and height must be != 0 - otherwise we can just return */ + g_return_if_fail (width); + g_return_if_fail (height); + radius = MAX (0, params->radius - params->xthickness); cairo_save (cr); -- 1.6.3.3