[gnome-photos] single-item-job: Use the GError to catch errors, not the return value



commit e8861f9e5c2ccb29650bf77fce77d3ed89d22a8a
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Nov 14 10:10:38 2012 +0100

    single-item-job: Use the GError to catch errors, not the return value

 src/photos-single-item-job.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-single-item-job.c b/src/photos-single-item-job.c
index d5af657..e5df96a 100644
--- a/src/photos-single-item-job.c
+++ b/src/photos-single-item-job.c
@@ -74,7 +74,7 @@ photos_single_item_job_cursor_next (GObject *source_object, GAsyncResult *res, g
 
   error = NULL;
   valid = tracker_sparql_cursor_next_finish (priv->cursor, res, &error);
-  if (!valid)
+  if (error != NULL)
     {
       g_warning ("Unable to query single item: %s", error->message);
       g_error_free (error);



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