[gnome-photos] tracker-queue: Keep a reference on self while the query is running



commit 0fcc939078a6e9a9ca5f7955985e8d3573af468a
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Nov 17 00:33:34 2012 +0100

    tracker-queue: Keep a reference on self while the query is running

 src/photos-tracker-queue.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-tracker-queue.c b/src/photos-tracker-queue.c
index 2366bcd..312b3d0 100644
--- a/src/photos-tracker-queue.c
+++ b/src/photos-tracker-queue.c
@@ -113,6 +113,7 @@ photos_tracker_queue_collector (GObject *source_object, GAsyncResult *res, gpoin
   photos_tracker_queue_data_free (data);
 
   photos_tracker_queue_check (self);
+  g_object_unref (self);
 }
 
 
@@ -140,7 +141,7 @@ photos_tracker_queue_check (PhotosTrackerQueue *self)
                                              data->sparql,
                                              data->cancellable,
                                              photos_tracker_queue_collector,
-                                             self);
+                                             g_object_ref (self));
       break;
 
     case PHOTOS_TRACKER_QUERY_UPDATE:
@@ -149,7 +150,7 @@ photos_tracker_queue_check (PhotosTrackerQueue *self)
                                               G_PRIORITY_DEFAULT,
                                               data->cancellable,
                                               photos_tracker_queue_collector,
-                                              self);
+                                              g_object_ref (self));
       break;
 
     case PHOTOS_TRACKER_QUERY_UPDATE_BLANK:
@@ -158,7 +159,7 @@ photos_tracker_queue_check (PhotosTrackerQueue *self)
                                                     G_PRIORITY_DEFAULT,
                                                     data->cancellable,
                                                     photos_tracker_queue_collector,
-                                                    self);
+                                                    g_object_ref (self));
       break;
     }
 }



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