[gtk+/gtk-3-14] notebook: Protect against invalid allocations
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] notebook: Protect against invalid allocations
- Date: Mon, 23 Mar 2015 03:32:39 +0000 (UTC)
commit fc22007559eeafd991d453698586b52fd02f380f
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 eff972d..dfe1b38 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]