Avoid division by 0 in the border rendering code

We skip sides with 0 border width in render_border, but when
we collect sides with the same style, we may pass the 0 width
down to render_frame_stroke anyway. So skip width 0 sides
there as well.
This commit is contained in:
Matthias Clasen 2016-01-09 17:30:33 -05:00
parent 7d0173763e
commit caaf537f94

View File

@ -518,11 +518,14 @@ render_frame_stroke (cairo_t *cr,
border_width[GTK_CSS_BOTTOM],
border_width[GTK_CSS_LEFT]);
for (i = 0; i < 4; i++)
for (i = 0; i < 4; i++)
{
if (hidden_side & (1 << i))
continue;
if (border_width[i] == 0)
continue;
cairo_save (cr);
if (i == 0)