[eog/wip/friemann/image-ref-cnt: 2/3] EogListStore: Release initial reference on new EogImages
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [eog/wip/friemann/image-ref-cnt: 2/3] EogListStore: Release initial reference on new EogImages
- Date: Wed,  2 Dec 2020 21:27:51 +0000 (UTC)
commit 369887c836bd7e5d959cc13162d57ad326c0ec56
Author: Felix Riemann <friemann gnome org>
Date:   Wed Dec 2 22:23:58 2020 +0100
    EogListStore: Release initial reference on new EogImages
    
    Adding it to the ListStore will add another reference, so the initial
    one needs to be dropped.
 src/eog-list-store.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/eog-list-store.c b/src/eog-list-store.c
index c7991778..e7b728fa 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
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]