summaryrefslogtreecommitdiff
path: root/gtk/gtklistitemwidget.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2022-08-14 22:55:27 +0200
committerBenjamin Otte <otte@redhat.com>2022-08-14 22:55:27 +0200
commit918dd66dca14c7827bdfcce0a19d6dde12030d6a (patch)
treead7d953615afaed104d723e23a7685d042747734 /gtk/gtklistitemwidget.c
parentf1e81d176cc454b0bd9729196b495c59f8b994dc (diff)
downloadgtk+-918dd66dca14c7827bdfcce0a19d6dde12030d6a.tar.gz
listitemwidget: Actually unref the listitems
Fixes #5102
Diffstat (limited to 'gtk/gtklistitemwidget.c')
-rw-r--r--gtk/gtklistitemwidget.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtklistitemwidget.c b/gtk/gtklistitemwidget.c
index c62b59f3a2..8681265db6 100644
--- a/gtk/gtklistitemwidget.c
+++ b/gtk/gtklistitemwidget.c
@@ -209,14 +209,16 @@ static void
gtk_list_item_widget_teardown_factory (GtkListItemWidget *self)
{
GtkListItemWidgetPrivate *priv = gtk_list_item_widget_get_instance_private (self);
+ GtkListItem *list_item = priv->list_item;
gtk_list_item_factory_teardown (priv->factory,
- G_OBJECT (priv->list_item),
+ G_OBJECT (list_item),
priv->item != NULL,
gtk_list_item_widget_teardown_func,
self);
g_assert (priv->list_item == NULL);
+ g_object_unref (list_item);
}
static void