[gtk] stack: Don't leak a reference



commit 2dd85b826f5f87e79787bc38181287b5834c5b88
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Feb 13 08:42:58 2019 -0500

    stack: Don't leak a reference
    
    The page holds a reference to the widget, so can't just clear
    this pointer.

 gtk/gtkstack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 633a5ae712..c1c843a45a 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -1425,7 +1425,7 @@ stack_remove (GtkStack  *stack,
 
   was_visible = gtk_widget_get_visible (child);
 
-  child_info->widget = NULL;
+  g_clear_object (&child_info->widget);
 
   if (priv->visible_child == child_info)
     {


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