[gtk+/gtk-3-16] notebook: Protect against invalid allocations
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-16] notebook: Protect against invalid allocations
- Date: Mon, 23 Mar 2015 03:13:01 +0000 (UTC)
commit 79ab6c8963d8b18624604623d3cd764a07d5ff29
Author: Benjamin Otte <otte redhat com>
Date: Tue Mar 17 16:45:05 2015 +0100
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 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 65cc32e..ef27191 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]