From 1270bcd5c3cd30791e78a09109400e0263cc66df Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Sun, 21 Apr 2013 01:35:57 +0200 Subject: [PATCH] gtkcontainer: Don't propagate draws to non-drawable widgets This short-circuits the propagation a bit earlier and fixes a crash when looking for has_native_window on non-realized widgets. --- gtk/gtkcontainer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 7c17d49c23..130061ea15 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -3324,6 +3324,9 @@ gtk_container_propagate_draw (GtkContainer *container, g_assert (gtk_widget_get_parent (child) == GTK_WIDGET (container)); + if (!gtk_widget_is_drawable (child)) + return; + event = _gtk_cairo_get_event (cr); if (event) {