widget: Plug layout manager leak

This commit is contained in:
Timm Bäder 2019-09-29 07:57:43 +02:00
parent b5b81dea7f
commit 355d3f070a

View File

@ -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);