[epiphany/mcatanzaro/webapp-profile: 16/19] web-app-utils: Don't misuse NULL GFileEnumerator



commit a1d22070148bb822cca06df90662499732e6fe39
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sun Mar 17 11:09:35 2019 -0500

    web-app-utils: Don't misuse NULL GFileEnumerator
    
    If the directory doesn't exist, we have to handle NULL here.

 lib/ephy-web-app-utils.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c
index a362fb91b..97f3f2420 100644
--- a/lib/ephy-web-app-utils.c
+++ b/lib/ephy-web-app-utils.c
@@ -610,6 +610,8 @@ ephy_web_application_get_application_list_internal (gboolean only_legacy)
   children = g_file_enumerate_children (parent_directory,
                                         "standard::name",
                                         0, NULL, NULL);
+  if (!children)
+    return NULL;
 
   info = g_file_enumerator_next_file (children, NULL, NULL);
   while (info) {


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