diff options
Diffstat (limited to 'daemon/gdmconfig.c')
-rw-r--r-- | daemon/gdmconfig.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/daemon/gdmconfig.c b/daemon/gdmconfig.c index df210246..1ff4024a 100644 --- a/daemon/gdmconfig.c +++ b/daemon/gdmconfig.c @@ -816,9 +816,10 @@ gdm_config_key_to_string_per_display (const gchar *display, gchar *key, gchar ** file = gdm_get_per_display_custom_config_file (display); - if (strcmp (ve_sure_string (splitstr[0]), "greeter") == 0 || - strcmp (ve_sure_string (splitstr[0]), "gui") == 0 || - is_key (key, GDM_KEY_PAM_STACK)) { + if (splitstr != NULL && + (strcmp (ve_sure_string (splitstr[0]), "greeter") == 0 || + strcmp (ve_sure_string (splitstr[0]), "gui") == 0 || + is_key (key, GDM_KEY_PAM_STACK))) { gdm_config_key_to_string (file, key, retval); } @@ -844,7 +845,7 @@ gdm_config_key_to_string (gchar *file, gchar *key, gchar **retval) *retval = NULL; /* Should not fail, all keys should have a category. */ - if (splitstr[0] == NULL) + if (splitstr == NULL || splitstr[0] == NULL) return; /* If file doesn't exist, then just return */ @@ -1705,7 +1706,7 @@ gdm_update_config (gchar* key) if (custom_cfg != NULL) { gchar **splitstr = g_strsplit (key, "/", 2); - if (splitstr[0] != NULL) { + if (splitstr != NULL && splitstr[0] != NULL) { GList *list = ve_config_get_keys (custom_cfg, splitstr[0]); while (list != NULL) { @@ -1893,7 +1894,7 @@ gdm_load_config_option (gpointer key_in, gpointer value_in, gpointer data) /* First check the custom file */ if (cfgfiles->custom_cfg != NULL) { gchar **splitstr = g_strsplit (key_in, "/", 2); - if (splitstr[0] != NULL) { + if (splitstr != NULL && splitstr[0] != NULL) { GList *list = ve_config_get_keys (cfgfiles->custom_cfg, splitstr[0]); while (list != NULL) { |