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
parent dcfa55ac7e
commit 0529e15d61

View File

@ -4822,6 +4822,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);