[gnome-photos] base-item: Don't set a NULL op_res with g_object_unref to destroy it



commit 93bcdeef9046ec867dbce28e3687b5f41527295e
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Aug 2 15:42:44 2013 +0200

    base-item: Don't set a NULL op_res with g_object_unref to destroy it

 src/photos-base-item.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 48a1f7b..ce4fc60 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -594,9 +594,12 @@ photos_base_item_load_in_thread_func (GSimpleAsyncResult *simple, GObject *objec
 
   node = photos_base_item_load (self, cancellable, &error);
   if (error != NULL)
-    g_simple_async_result_take_error (simple, error);
-
-  g_simple_async_result_set_op_res_gpointer (simple, (gpointer) node, g_object_unref);
+    {
+      g_simple_async_result_take_error (simple, error);
+      g_simple_async_result_set_op_res_gpointer (simple, NULL, NULL);
+    }
+  else
+    g_simple_async_result_set_op_res_gpointer (simple, (gpointer) node, g_object_unref);
 
   g_mutex_unlock (&priv->mutex);
 }


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