[recipes/move-g-info-stmt] exporter: Don't call g_list_length() on NULL



commit 72548f6adc0c86dbe8d2a8e0f80bbe5a1e2bea5b
Author: Matthew Leeds <matthew leeds endlessm com>
Date:   Sun Feb 16 19:42:48 2020 -0800

    exporter: Don't call g_list_length() on NULL

 src/gr-recipe-exporter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gr-recipe-exporter.c b/src/gr-recipe-exporter.c
index 7131855..8bda875 100644
--- a/src/gr-recipe-exporter.c
+++ b/src/gr-recipe-exporter.c
@@ -838,11 +838,11 @@ gr_recipe_exporter_export_all (GrRecipeExporter *exporter,
 {
         collect_all_recipes (exporter);
 
-        g_info ("Exporting %d recipes", g_list_length (exporter->recipes));
-
         if (exporter->recipes == NULL)
                 return;
 
+        g_info ("Exporting %d recipes", g_list_length (exporter->recipes));
+
         exporter->output = file;
 
         exporter->just_export = TRUE;


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