Commit ad834625 authored by Michael Natterer's avatar Michael Natterer 😴

app: unref the filtered container in GObject::dispose()

It was simply never destroyed at all before.
parent c9bde335
......@@ -70,6 +70,7 @@ struct _GimpDataFactoryViewPriv
};
static void gimp_data_factory_view_dispose (GObject *object);
static void gimp_data_factory_view_activate_item (GimpContainerEditor *editor,
GimpViewable *viewable);
static void gimp_data_factory_view_select_item (GimpContainerEditor *editor,
......@@ -89,8 +90,11 @@ G_DEFINE_TYPE (GimpDataFactoryView, gimp_data_factory_view,
static void
gimp_data_factory_view_class_init (GimpDataFactoryViewClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpContainerEditorClass *editor_class = GIMP_CONTAINER_EDITOR_CLASS (klass);
object_class->dispose = gimp_data_factory_view_dispose;
editor_class->select_item = gimp_data_factory_view_select_item;
editor_class->activate_item = gimp_data_factory_view_activate_item;
......@@ -115,6 +119,20 @@ gimp_data_factory_view_init (GimpDataFactoryView *view)
view->priv->refresh_button = NULL;
}
static void
gimp_data_factory_view_dispose (GObject *object)
{
GimpDataFactoryView *factory_view = GIMP_DATA_FACTORY_VIEW (object);
if (factory_view->priv->tag_filtered_container)
{
g_object_unref (factory_view->priv->tag_filtered_container);
factory_view->priv->tag_filtered_container = NULL;
}
G_OBJECT_CLASS (parent_class)->dispose (object);
}
GtkWidget *
gimp_data_factory_view_new (GimpViewType view_type,
GimpDataFactory *factory,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment