[gnome-photos/wip/rishi/misc-fixes: 10/20] tracker-controller: Make the ref / unref pairs more obvious
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/misc-fixes: 10/20] tracker-controller: Make the ref / unref pairs more obvious
- Date: Tue, 15 Dec 2015 20:09:30 +0000 (UTC)
commit 38610b1a5293b8f2a803198795a67bf568b9afee
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Dec 15 12:10:16 2015 +0100
tracker-controller: Make the ref / unref pairs more obvious
src/photos-tracker-controller.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-tracker-controller.c b/src/photos-tracker-controller.c
index 3aae435..0d77b5a 100644
--- a/src/photos-tracker-controller.c
+++ b/src/photos-tracker-controller.c
@@ -138,8 +138,7 @@ 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 (self);
- return;
+ goto out;
}
now = g_get_monotonic_time ();
@@ -149,7 +148,10 @@ photos_tracker_controller_cursor_next (GObject *source_object, GAsyncResult *res
tracker_sparql_cursor_next_async (cursor,
priv->cancellable,
photos_tracker_controller_cursor_next,
- self);
+ g_object_ref (self));
+
+ out:
+ g_object_unref (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]