forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
dcfa55ac7e
commit
0529e15d61
@ -4822,6 +4822,8 @@ gtk_notebook_redraw_tabs (GtkNotebook *notebook)
|
|||||||
redraw_rect.y = border;
|
redraw_rect.y = border;
|
||||||
|
|
||||||
gtk_widget_get_allocation (widget, &allocation);
|
gtk_widget_get_allocation (widget, &allocation);
|
||||||
|
if (allocation.width <= 1)
|
||||||
|
return;
|
||||||
|
|
||||||
get_padding_and_border (notebook, &padding);
|
get_padding_and_border (notebook, &padding);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user