forked from AuroraMiddleware/gtk
levelbar: fix a crash
We should not try to access a block with an index that exceeds the number of blocks in the widget.
This commit is contained in:
parent
8109520d4e
commit
6322b1f647
@ -712,6 +712,8 @@ update_level_style_classes (GtkLevelBar *self)
|
||||
num_blocks = (gint) round (priv->max_value) - (gint) round (priv->min_value);
|
||||
}
|
||||
|
||||
num_filled = MIN (num_blocks, num_filled);
|
||||
|
||||
classes[0] = "filled";
|
||||
classes[1] = value_class;
|
||||
for (i = 0; i < num_filled; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user