[gnome-photos] item-manager: Don't try to ref a NULL collection



commit 1c409f5fcfba33fb450b8141be5b36403dcdcdda
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Apr 3 01:04:17 2013 +0200

    item-manager: Don't try to ref a NULL collection
    
    This can happen when traversing into the top level collection.

 src/photos-item-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index cd7eae1..b20943a 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -148,7 +148,7 @@ photos_item_manager_set_active_object (PhotosBaseManager *manager, GObject *obje
       GObject *collection;
 
       collection = photos_base_manager_get_active_object (priv->col_mngr);
-      g_queue_push_head (priv->collection_path, g_object_ref (collection));
+      g_queue_push_head (priv->collection_path, (collection != NULL) ? g_object_ref (collection) : NULL);
       photos_base_manager_set_active_object (priv->col_mngr, object);
       goto out;
     }


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