[epiphany/gnome-3-32] web-app-utils: Don't misuse NULL GFileEnumerator
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-32] web-app-utils: Don't misuse NULL GFileEnumerator
- Date: Wed, 20 Mar 2019 16:14:08 +0000 (UTC)
commit 0e54b770b7a132518b8df70af6668714d6a5d60c
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]