widget: Don't lose a layout manager ref

gtk_widget_set_layout_manager is transfer-full,
so we must give it a new reference from set_property
to implement object property semantics properly.
This commit is contained in:
Matthias Clasen 2019-07-03 13:16:35 +00:00
parent 19a4ee031d
commit 9768f35931

View File

@ -2303,7 +2303,7 @@ gtk_widget_set_property (GObject *object,
gtk_css_node_set_name (priv->cssnode, GTK_WIDGET_GET_CLASS (widget)->priv->css_name);
break;
case PROP_LAYOUT_MANAGER:
gtk_widget_set_layout_manager (widget, g_value_get_object (value));
gtk_widget_set_layout_manager (widget, g_value_dup_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);