projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcfa55a
)
notebook: Protect against invalid allocations
author
Benjamin Otte
<otte@redhat.com>
Tue, 17 Mar 2015 15:45:05 +0000
(16:45 +0100)
committer
Benjamin Otte
<otte@redhat.com>
Wed, 18 Mar 2015 14:14:47 +0000
(15:14 +0100)
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
patch
|
blob
|
history
diff --git
a/gtk/gtknotebook.c
b/gtk/gtknotebook.c
index 65cc32e1032e92167da58bc64d86054c53656d11..ef271913873906555e12bc0b90c606ab8e2cae0c 100644
(file)
--- 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);