aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-08-11 09:05:07 -0500
committerTed Gould <ted@gould.cx>2010-08-11 09:05:07 -0500
commitbdd9c8541f5df134ad5460ef192c7dc019e893eb (patch)
treee5f4b84dfc665fef7c0504dde272010d61692901 /src
parent51de4ced42e132fa3a66a2739e8a3ba861842467 (diff)
downloadlibayatana-appindicator-bdd9c8541f5df134ad5460ef192c7dc019e893eb.tar.gz
libayatana-appindicator-bdd9c8541f5df134ad5460ef192c7dc019e893eb.tar.bz2
libayatana-appindicator-bdd9c8541f5df134ad5460ef192c7dc019e893eb.zip
Ensuring that we got a list of keys so we don't crash
Diffstat (limited to 'src')
-rw-r--r--src/application-service-appstore.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index d632456..2306230 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -273,7 +273,14 @@ load_override_file (GHashTable * hash, const gchar * filename)
return;
}
- gchar ** keys = g_key_file_get_keys(keyfile, OVERRIDE_GROUP_NAME, NULL, NULL);
+ gchar ** keys = g_key_file_get_keys(keyfile, OVERRIDE_GROUP_NAME, NULL, &error);
+ if (error != NULL) {
+ g_warning("Unable to get keys from keyfile '%s' because: %s", filename, error->message);
+ g_error_free(error);
+ g_key_file_free(keyfile);
+ return;
+ }
+
gchar * key = keys[0];
gint i;