summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <halfline@gmail.com>2021-12-22 21:07:40 +0000
committerRay Strode <halfline@gmail.com>2021-12-22 21:07:40 +0000
commitf7aaba5d77fcca23816f8c43e96ea5ae1797a9ba (patch)
tree114a8970e8a245760c786529b978efea912cc1d6
parent153608ab85034af6ca909fa7aa79d60e6d74d179 (diff)
parente3a6b65f768d177a822111812d5d65ce41188fe3 (diff)
downloadgdm-f7aaba5d77fcca23816f8c43e96ea5ae1797a9ba.tar.gz
Merge branch 'wjt/handle-missing-GDM_SUPPORTED_SESSION_TYPES-env' into 'main'
libgdm: Handle GDM_SUPPORTED_SESSION_TYPES being unset Closes #748 See merge request GNOME/gdm!165
-rw-r--r--libgdm/gdm-sessions.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c
index f078e04b..d8b4d5cd 100644
--- a/libgdm/gdm-sessions.c
+++ b/libgdm/gdm-sessions.c
@@ -277,9 +277,13 @@ collect_sessions (void)
DATADIR "/gdm/BuiltInSessions/",
DATADIR "/xsessions/",
};
+ const gchar *supported_session_types_env = NULL;
g_auto (GStrv) supported_session_types = NULL;
- supported_session_types = g_strsplit (g_getenv ("GDM_SUPPORTED_SESSION_TYPES"), ":", -1);
+ supported_session_types_env = g_getenv ("GDM_SUPPORTED_SESSION_TYPES");
+ if (supported_session_types_env != NULL) {
+ supported_session_types = g_strsplit (supported_session_types_env, ":", -1);
+ }
names_seen_before = g_hash_table_new (g_str_hash, g_str_equal);
xorg_search_array = g_ptr_array_new_with_free_func (g_free);