label: Fix another sizing corner case causing segfaults
If the "wider" label is the smaller one, use the wider size for both cases. This can happen when ellipsizing a single character, which is often smaller than the ellipsizing glpyph(s).
This commit is contained in:
@ -3557,7 +3557,8 @@ gtk_label_get_preferred_layout_size (GtkLabel *label,
|
||||
*smallest = *widest;
|
||||
}
|
||||
|
||||
g_assert (widest->width >= smallest->width);
|
||||
if (widest->width < smallest->width)
|
||||
*smallest = *widest;
|
||||
|
||||
g_object_unref (layout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user