[seahorse] common/item-list: Don't ref collection objects



commit d1d6f1e00ee32c7639eff8b9ce10ab7f72bb2b7f
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Mon Feb 22 19:01:09 2021 +0100

    common/item-list: Don't ref collection objects

 common/item-list.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/common/item-list.vala b/common/item-list.vala
index c01a803b..6bc9840a 100644
--- a/common/item-list.vala
+++ b/common/item-list.vala
@@ -91,7 +91,7 @@ public class Seahorse.ItemList : GLib.Object, GLib.ListModel {
         collection.removed.connect(on_collection_item_removed);
 
         // Add the existing elements
-        foreach (var obj in collection.get_objects())
+        foreach (weak GLib.Object obj in collection.get_objects())
             this.items.add(obj);
 
         // Sort afterwards
@@ -202,7 +202,7 @@ public class Seahorse.ItemList : GLib.Object, GLib.ListModel {
         this.items.remove_range(0, len);
 
         // Add only the ones that match the filter
-        foreach (var obj in this.base_collection.get_objects()) {
+        foreach (weak GLib.Object obj in this.base_collection.get_objects()) {
             if (item_matches_filters(obj))
                 this.items.add(obj);
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]