[gtk/layout-manager-ref] widget: Don't lose a layout manager ref
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/layout-manager-ref] widget: Don't lose a layout manager ref
- Date: Wed, 3 Jul 2019 13:19:26 +0000 (UTC)
commit 9768f359316dc52a0898416f52e1fc09c6c40474
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jul 3 13:16:35 2019 +0000
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.
gtk/gtkwidget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index dd6e67dda7..42ba750375 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]