summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Riemann <friemann@gnome.org>2020-12-02 22:23:58 +0100
committerFelix Riemann <friemann@gnome.org>2020-12-02 22:34:46 +0100
commit4364769bfe36904de1e6483c38bd3dccfe5e02d2 (patch)
tree395028e3806f512fd7bac2afd8014941473a2438
parent0e0c116bc0803e30cddefee71243fa85b923cc69 (diff)
downloadeog-4364769bfe36904de1e6483c38bd3dccfe5e02d2.tar.gz
EogListStore: Release initial reference on new EogImages
Adding it to the ListStore will add another reference, so the initial one needs to be dropped.
-rw-r--r--src/eog-list-store.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/eog-list-store.c b/src/eog-list-store.c
index c7991778..baeada40 100644
--- a/src/eog-list-store.c
+++ b/src/eog-list-store.c
@@ -368,6 +368,8 @@ eog_list_store_append_image_from_file (EogListStore *store,
image = eog_image_new_file (file, caption);
eog_list_store_append_image (store, image);
+
+ g_object_unref (image);
}
static void
@@ -527,6 +529,7 @@ directory_visit (GFile *directory,
child = g_file_get_child (directory, name);
caption = g_file_info_get_display_name (children_info);
eog_list_store_append_image_from_file (store, child, caption);
+ g_object_unref(child);
}
}