[gnome-photos] single-item-job: Be robust against PhotosTrackerQueue failures



commit e7d662cd9924b97934fc0371519d0224b1a720b8
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Dec 28 13:45:56 2013 +0100

    single-item-job: Be robust against PhotosTrackerQueue failures
    
    Fixes: https://bugzilla.gnome.org/704947

 src/photos-single-item-job.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-single-item-job.c b/src/photos-single-item-job.c
index 592b3a2..b74339b 100644
--- a/src/photos-single-item-job.c
+++ b/src/photos-single-item-job.c
@@ -208,6 +208,13 @@ photos_single_item_job_run (PhotosSingleItemJob *self,
   PhotosSingleItemJobPrivate *priv = self->priv;
   PhotosQuery *query;
 
+  if (G_UNLIKELY (priv->queue == NULL))
+    {
+      if (callback != NULL)
+        (*callback) (NULL, user_data);
+      return;
+    }
+
   priv->callback = callback;
   priv->user_data = user_data;
 


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