[gtk+] container: Turn assert into return_if_fail()



commit d4f853dc649e84b70a8b0dedcc9def00719e872c
Author: Benjamin Otte <otte redhat com>
Date:   Thu Jan 21 02:19:04 2016 +0100

    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 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 1df06ad..2f4cf2a 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]