[frogr] Don't continue uploading if some error has happened



commit 19c9285fc1ef33c65b1adc79e307ea49cf489af4
Author: Mario Sanchez Prada <msanchez gnome org>
Date:   Sat Dec 29 10:18:44 2012 +0100

    Don't continue uploading if some error has happened

 src/frogr-controller.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index da4e149..27926a0 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -1646,16 +1646,17 @@ _complete_picture_upload_on_idle (gpointer data)
     }
   picture = uop_data->picture;
 
-  if (!uop_data->is_cancelled)
+  if (uop_data->is_cancelled || up_data->error)
+    {
+      up_data->current = NULL;
+    }
+  else
     {
       /* Remove it from the model if no error happened */
       FrogrModel *model = NULL;
       model = frogr_main_view_get_model (priv->mainview);
       frogr_model_remove_picture (model, picture);
     }
-  else {
-    up_data->current = NULL;
-  }
 
   /* Re-check account info to make sure we have up-to-date info */
   _fetch_account_info (controller);



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