gridview: Avoid a critical
The code can hit this path with heights->len being 0, and it does not seem to have any ill effects, apart from this critical warning. Fixes: #5836
This commit is contained in:
@@ -553,7 +553,8 @@ static int
|
||||
gtk_grid_view_get_unknown_row_size (GtkGridView *self,
|
||||
GArray *heights)
|
||||
{
|
||||
g_return_val_if_fail (heights->len > 0, 0);
|
||||
if (heights->len == 0)
|
||||
return 0;
|
||||
|
||||
/* return the median and hope rows are generally uniform with few outliers */
|
||||
g_array_sort (heights, compare_ints);
|
||||
|
||||
Reference in New Issue
Block a user