mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 14:20:21 +00:00
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_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)
|
||||
|
Loading…
Reference in New Issue
Block a user