summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2016-11-14 14:19:58 -0500
committerMatthias Clasen <mclasen@redhat.com>2016-11-14 14:19:58 -0500
commit34e26017e3c2432a6675e5ce6a1c64163a05e4fb (patch)
tree3f899bd1976c05ffa0fe2c0ede2c7c8c555eaf14
parent83712a48f4ec5f75f8f8c226561c1a6e1714cad4 (diff)
downloadgtk+-34e26017e3c2432a6675e5ce6a1c64163a05e4fb.tar.gz
appchooser: Plug a memory leak
We were not dropping the reference that the model gives us. https://bugzilla.gnome.org/show_bug.cgi?id=774352
-rw-r--r--gtk/gtkappchooserwidget.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkappchooserwidget.c b/gtk/gtkappchooserwidget.c
index f45348e735..9a4103a8fc 100644
--- a/gtk/gtkappchooserwidget.c
+++ b/gtk/gtkappchooserwidget.c
@@ -161,17 +161,17 @@ refresh_and_emit_app_selected (GtkAppChooserWidget *self,
if (!g_app_info_equal (self->priv->selected_app_info, info))
{
should_emit = TRUE;
- g_object_unref (self->priv->selected_app_info);
-
- self->priv->selected_app_info = info;
+ g_set_object (&self->priv->selected_app_info, info);
}
}
else
{
should_emit = TRUE;
- self->priv->selected_app_info = info;
+ g_set_object (&self->priv->selected_app_info, info);
}
+ g_object_unref (info);
+
if (should_emit)
g_signal_emit (self, signals[SIGNAL_APPLICATION_SELECTED], 0,
self->priv->selected_app_info);