[gtk/wip/baedert/for-master: 2/25] widget: Plug layout manager leak



commit e47fea8e8197e55147a16f03a0bd7c89c8ff3fc3
Author: Timm Bäder <mail baedert org>
Date:   Sun Sep 29 07:57:43 2019 +0200

    widget: Plug layout manager leak

 gtk/gtkwidget.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 877b387d43..51a2794feb 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13438,6 +13438,12 @@ gtk_widget_set_layout_manager (GtkWidget        *widget,
   if (priv->layout_manager == layout_manager)
     return;
 
+  if (priv->layout_manager)
+    {
+      gtk_layout_manager_set_widget (priv->layout_manager, NULL);
+      g_object_unref (priv->layout_manager);
+    }
+
   priv->layout_manager = layout_manager;
   if (priv->layout_manager != NULL)
     gtk_layout_manager_set_widget (priv->layout_manager, widget);


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