From d4f853dc649e84b70a8b0dedcc9def00719e872c Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 21 Jan 2016 02:19:04 +0100 Subject: [PATCH] container: Turn assert into return_if_fail() There's no reason to insta-crash when something goes wrong. Just don't do anything stupid. Also, remove the SPCIAL_CONTAINER() exception. Every case where special containers needed this, it is wrong and made containers draw children multiple times. --- gtk/gtkcontainer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 1df06adb4e..2f4cf2a08a 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -3756,9 +3756,7 @@ gtk_container_propagate_draw (GtkContainer *container, g_return_if_fail (GTK_IS_CONTAINER (container)); g_return_if_fail (GTK_IS_WIDGET (child)); g_return_if_fail (cr != NULL); - - g_assert (_gtk_widget_get_parent (child) == GTK_WIDGET (container) || - SPECIAL_CONTAINER (container)); + g_return_if_fail (_gtk_widget_get_parent (child) == GTK_WIDGET (container)); if (!gtk_container_should_propagate_draw (container, child, cr)) return;