[epiphany/mcatanzaro/webapp-profile: 18/21] web-app-utils: Don't misuse NULL GFileEnumerator
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/webapp-profile: 18/21] web-app-utils: Don't misuse NULL GFileEnumerator
- Date: Wed, 20 Mar 2019 13:11:45 +0000 (UTC)
commit 9ee3a0ab003390531493cf56019de78312f5cc37
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 3217f5776..711327a98 100644
--- a/lib/ephy-web-app-utils.c
+++ b/lib/ephy-web-app-utils.c
@@ -612,6 +612,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]