notebook: Protect against invalid allocations

A widget can be mapped but not have a size allocated yet. In that case
avoid computing a broken rectangle.

https://bugzilla.gnome.org/show_bug.cgi?id=746301
This commit is contained in:
Benjamin Otte
2015-03-17 16:45:05 +01:00
committed by Matthias Clasen
parent 6a6350b855
commit fc22007559

View File

@@ -4793,6 +4793,8 @@ gtk_notebook_redraw_tabs (GtkNotebook *notebook)
redraw_rect.y = border;
gtk_widget_get_allocation (widget, &allocation);
if (allocation.width <= 1)
return;
get_padding_and_border (notebook, &padding);