[glib/portal: 11/17] Avoid a critical
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/portal: 11/17] Avoid a critical
- Date: Sun, 3 Jul 2016 22:04:15 +0000 (UTC)
commit 0912552c6746b4f4f7432f1a5e48ffccf2cfc645
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jun 23 10:16:15 2016 -0400
Avoid a critical
The key might not be present in flatpak-info. Deal with that.
gio/gportalsupport.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gio/gportalsupport.c b/gio/gportalsupport.c
index d7ba523..a14acd9 100644
--- a/gio/gportalsupport.c
+++ b/gio/gportalsupport.c
@@ -57,8 +57,11 @@ glib_network_available_in_sandbox (void)
char **shared = NULL;
shared = g_key_file_get_string_list (keyfile, "Context", "shared", NULL, NULL);
- available = g_strv_contains ((const char * const *)shared, "network");
- g_strfreev (shared);
+ if (shared)
+ {
+ available = g_strv_contains ((const char * const *)shared, "network");
+ g_strfreev (shared);
+ }
}
g_key_file_free (keyfile);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]