[gnome-photos] query: Hold a reference on the source



commit ff5860a70d5be0e85dccf2cd87d5637eeb4170e6
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Aug 11 20:50:20 2012 +0200

    query: Hold a reference on the source

 src/photos-query.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-query.c b/src/photos-query.c
index 5fda04b..d89a0f1 100644
--- a/src/photos-query.c
+++ b/src/photos-query.c
@@ -37,7 +37,7 @@ photos_query_new (gchar *sparql)
   src_mngr = photos_source_manager_new ();
   active_object = photos_base_manager_get_active_object (src_mngr);
   if (active_object != NULL)
-    query->source = PHOTOS_SOURCE (active_object);
+    query->source = PHOTOS_SOURCE (g_object_ref (active_object));
   g_object_unref (src_mngr);
 
   query->sparql = sparql;



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