[gnome-photos/wip/rishi/collection-icon-watcher-g-auto: 2/3] collection-icon-watcher: Simplify code




commit 503a86196b8aab48eadd370f71db0cc148a94857
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Apr 1 01:30:12 2021 +0200

    collection-icon-watcher: Simplify code

 src/photos-collection-icon-watcher.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/photos-collection-icon-watcher.c b/src/photos-collection-icon-watcher.c
index 8e1740ff..b5277117 100644
--- a/src/photos-collection-icon-watcher.c
+++ b/src/photos-collection-icon-watcher.c
@@ -366,8 +366,7 @@ photos_collection_icon_watcher_dispose (GObject *object)
   if (self->item_connections != NULL)
     {
       photos_collection_icon_watcher_destroy (self);
-      g_hash_table_unref (self->item_connections);
-      self->item_connections = NULL;
+      g_clear_pointer (&self->item_connections, g_hash_table_unref);
     }
 
   g_list_free_full (self->items, g_object_unref);


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