[recipes/recipes-1.0] Don't overwrite errors



commit d201fa4d0121076252e8867768e1d7886cf0367c
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Mar 28 09:30:54 2017 +0200

    Don't overwrite errors
    
    We need to clear the error every time we may have set it.

 src/gr-recipe-importer.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-recipe-importer.c b/src/gr-recipe-importer.c
index e011999..d6bb843 100644
--- a/src/gr-recipe-importer.c
+++ b/src/gr-recipe-importer.c
@@ -464,7 +464,9 @@ next:
         importer->recipe_instructions = key_file_get_string (importer->recipes_keyfile, id, "Instructions");
         importer->recipe_notes = key_file_get_string (importer->recipes_keyfile, id, "Notes");
         importer->recipe_serves = g_key_file_get_integer (importer->recipes_keyfile, id, "Serves", &error);
+        handle_or_clear_error (error);
         importer->recipe_spiciness = g_key_file_get_integer (importer->recipes_keyfile, id, "Spiciness", 
&error);
+        handle_or_clear_error (error);
         importer->recipe_default_image = g_key_file_get_integer (importer->recipes_keyfile, id, 
"DefaultImage", &error);
         handle_or_clear_error (error);
         importer->recipe_diets = g_key_file_get_integer (importer->recipes_keyfile, id, "Diets", &error);


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