From 0529e15d61e9e23ad16562d93491ed25f96eef77 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 65cc32e103..ef27191387 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -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);