[gtk/wip/baedert/for-master: 36/74] widget: Plug layout manager leak



commit fa22bddd2ca9e99889becfc4cc8076eebbd36039
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]