From fd848012163f8a63662479ca7c0773960a2c1a3c Mon Sep 17 00:00:00 2001 From: Alexander Sack Date: Fri, 30 Oct 2009 21:39:56 +0100 Subject: [PATCH] add assertion that height and width != 0 in murrine_draw_progressbar_fill (lp:460710) height/width in murrine_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. --- src/murrine_draw.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/murrine_draw.c b/src/murrine_draw.c index de5e540..aa2223a 100644 --- a/src/murrine_draw.c +++ b/src/murrine_draw.c @@ -610,6 +610,9 @@ murrine_draw_progressbar_fill (cairo_t *cr, rotate_mirror_translate (cr, M_PI/2, x, y+width, TRUE, FALSE); } + g_return_if_fail (height); + g_return_if_fail (width); + roundness = MIN (widget->roundness, (height-2.0)/2.0); stroke_width = height*2; x_step = (((float)stroke_width/10)*offset); -- 1.6.3.3