[gtk+] notebook: Protect against invalid allocations
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] notebook: Protect against invalid allocations
- Date: Wed, 18 Mar 2015 14:23:15 +0000 (UTC)
commit 0529e15d61e9e23ad16562d93491ed25f96eef77
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]