[gnome-photos] base-item: Check for errors while loading the item for printing



commit 2328a166003e4990d54e8a1b96e916b2150fb81e
Author: Umang Jain <mailumangjain gmail com>
Date:   Fri Mar 25 10:19:33 2016 +0530

    base-item: Check for errors while loading the item for printing
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763908

 src/photos-base-item.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index d1ee166..90da5eb 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -1486,9 +1486,13 @@ photos_base_item_print_load (GObject *source_object, GAsyncResult *res, gpointer
   GtkPrintOperation *print_op = NULL;
   GtkPrintOperationResult print_res;
 
-  node = photos_base_item_load_finish (self, res, NULL);
-  if (node == NULL)
-    goto out;
+  node = photos_base_item_load_finish (self, res, &error);
+  if (error != NULL)
+    {
+      g_warning ("Unable to load the item: %s", error->message);
+      g_error_free (error);
+      goto out;
+    }
 
   print_op = photos_print_operation_new (self, node);
 


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