[gnome-photos/wip/foo: 2/20] tracker-controller: Unref the cursor earlier



commit 043d4bbecfc6ac45fbd34500ec88f8dd1faead18
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Mar 30 17:51:54 2013 +0100

    tracker-controller: Unref the cursor earlier
    
    This makes it easier to follow the ref-unref pairs.

 src/photos-tracker-controller.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-tracker-controller.c b/src/photos-tracker-controller.c
index 0730663..d4fb120 100644
--- a/src/photos-tracker-controller.c
+++ b/src/photos-tracker-controller.c
@@ -120,7 +120,6 @@ photos_tracker_controller_cursor_next (GObject *source_object, GAsyncResult *res
     {
       tracker_sparql_cursor_close (cursor);
       photos_tracker_controller_query_finished (self, NULL);
-      g_object_unref (cursor);
       g_object_unref (self);
       return;
     }
@@ -157,6 +156,7 @@ photos_tracker_controller_query_executed (GObject *source_object, GAsyncResult *
                                     self->priv->cancellable,
                                     photos_tracker_controller_cursor_next,
                                     g_object_ref (self));
+  g_object_unref (cursor);
 }
 
 


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