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:
parent
7d0173763e
commit
caaf537f94
@ -518,11 +518,14 @@ render_frame_stroke (cairo_t *cr,
|
|||||||
border_width[GTK_CSS_BOTTOM],
|
border_width[GTK_CSS_BOTTOM],
|
||||||
border_width[GTK_CSS_LEFT]);
|
border_width[GTK_CSS_LEFT]);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
if (hidden_side & (1 << i))
|
if (hidden_side & (1 << i))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (border_width[i] == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
cairo_save (cr);
|
cairo_save (cr);
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user