[gnome-photos] offset-controller: Unref the cursor immediately after the async call



commit 2df287c999b1e7c374067a27b9600e9730e1cc6f
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Aug 16 20:27:40 2012 +0200

    offset-controller: Unref the cursor immediately after the async call
    
    ... because we are not going to to make any subsequent calls on it.

 src/photos-offset-controller.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-offset-controller.c b/src/photos-offset-controller.c
index be150b8..2beafd5 100644
--- a/src/photos-offset-controller.c
+++ b/src/photos-offset-controller.c
@@ -71,7 +71,6 @@ photos_offset_controller_cursor_next (GObject *source_object, GAsyncResult *res,
     }
 
   tracker_sparql_cursor_close (cursor);
-  g_object_unref (cursor);
   g_object_unref (self);
 }
 
@@ -93,6 +92,7 @@ photos_offset_controller_reset_count_query_executed (GObject *source_object, GAs
     }
 
   tracker_sparql_cursor_next_async (cursor, NULL, photos_offset_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]