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:
Benjamin Otte
2012-11-08 23:15:19 +01:00
parent 947fed0961
commit 0d9a45d460

View File

@ -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);
}