[gnome-photos/wip/rishi/misc-fixes: 12/20] tracker-controller: Guard against get_query returning NULL



commit 94515a564ed0800209539bf9144cd4d4197d5b2a
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Dec 15 12:31:58 2015 +0100

    tracker-controller: Guard against get_query returning NULL

 src/photos-tracker-controller.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-tracker-controller.c b/src/photos-tracker-controller.c
index 6adfd6b..0666143 100644
--- a/src/photos-tracker-controller.c
+++ b/src/photos-tracker-controller.c
@@ -192,6 +192,8 @@ photos_tracker_controller_perform_current_query (PhotosTrackerController *self)
     photos_query_free (priv->current_query);
 
   priv->current_query = PHOTOS_TRACKER_CONTROLLER_GET_CLASS (self)->get_query (self);
+  g_return_if_fail (priv->current_query != NULL);
+
   g_cancellable_reset (priv->cancellable);
 
   if (G_UNLIKELY (priv->queue == NULL))


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