From fc22007559eeafd991d453698586b52fd02f380f Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 17 Mar 2015 16:45:05 +0100 Subject: [PATCH] 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 --- gtk/gtknotebook.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index eff972d963..dfe1b38570 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -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);