[gnome-photos] base-item: Don't use g_task_had_error



commit 3e7dbb4735002ae20d9fb8cddb8c087d8c1409ae
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Nov 2 14:00:51 2017 +0100

    base-item: Don't use g_task_had_error
    
    In theory, the GCancellable associated with the GTask can be triggered
    from another thread in between the g_task_propagate_pointer and
    g_task_had_error calls. Therefore it's better to stay away from this
    pattern.

 src/photos-base-item.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 47514d0..46ffb13 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -3670,7 +3670,7 @@ photos_base_item_guess_save_sizes_finish (PhotosBaseItem *self,
   g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
 
   sizes = g_task_propagate_pointer (task, error);
-  if (g_task_had_error (task))
+  if (sizes == NULL)
     goto out;
 
   if (!photos_base_item_get_bbox_edited (self, &bbox))


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