diff options
author | Benjamin Berg <benjamin@sipsolutions.net> | 2008-03-11 09:54:46 (GMT) |
---|---|---|
committer | Benjamin Berg <benjamin@sipsolutions.net> | 2008-03-11 09:54:46 (GMT) |
commit | 7ccfc4747e1f38352778d1a6683822f78ed213c3 (patch) | |
tree | 89553411339f7d71e30207af05d7f5bfd016ab7e | |
parent | 3d16dee503efb590c564ff13c65fd48d2dab90f2 (diff) |
Replace two asserts in draw_[hv]line with normal returns.
-rw-r--r-- | gtk/engine/sugar-style.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/engine/sugar-style.c b/gtk/engine/sugar-style.c index b9af65f..24cbc9b 100644 --- a/gtk/engine/sugar-style.c +++ b/gtk/engine/sugar-style.c @@ -133,7 +133,8 @@ sugar_style_draw_hline(GtkStyle *style, gdk_cairo_set_source_color (cr, &style->bg[state_type]); - g_assert (x1 < x2); + if (x1 > x2) + return; width = x2 - x1 + 1; height = SUGAR_RC_STYLE (style->rc_style)->line_width; @@ -175,7 +176,8 @@ sugar_style_draw_vline(GtkStyle *style, gdk_cairo_set_source_color (cr, &style->bg[state_type]); - g_assert (y1 < y2); + if (y1 > y2) + return; height = y2 - y1 + 1; width = SUGAR_RC_STYLE (style->rc_style)->line_width; |