[gnome-photos/wip/rishi/misc-fixes: 9/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: 9/20] tracker-controller: Make the ref / unref pairs more obvious
- Date: Wed, 16 Dec 2015 11:58:41 +0000 (UTC)
commit b7df7a71bf14dbaf490bb9a792517280e6c7c555
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]