From a1277882f1ee62318715cf7a9a93a7669aaad218 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 27 Mar 2017 16:56:29 -0400 Subject: launch-environment: fix crasher when session-mode isn't set This commit fixes a crasher when starting the indirect chooser. https://bugzilla.gnome.org/show_bug.cgi?id=780618 --- daemon/gdm-launch-environment.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'daemon') diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c index a30276b4..4372ac29 100644 --- a/daemon/gdm-launch-environment.c +++ b/daemon/gdm-launch-environment.c @@ -155,14 +155,15 @@ build_launch_environment (GdmLaunchEnvironment *launch_environment, if (launch_environment->priv->x11_authority_file != NULL) g_hash_table_insert (hash, g_strdup ("XAUTHORITY"), g_strdup (launch_environment->priv->x11_authority_file)); - if (launch_environment->priv->session_mode != NULL) + if (launch_environment->priv->session_mode != NULL) { g_hash_table_insert (hash, g_strdup ("GNOME_SHELL_SESSION_MODE"), g_strdup (launch_environment->priv->session_mode)); - /* Inital setup needs gvfs for fetching remote avatars. */ - if (strcmp (launch_environment->priv->session_mode, INITIAL_SETUP_SESSION_MODE) != 0) { - g_hash_table_insert (hash, g_strdup ("GVFS_DISABLE_FUSE"), g_strdup ("1")); - g_hash_table_insert (hash, g_strdup ("GIO_USE_VFS"), g_strdup ("local")); - g_hash_table_insert (hash, g_strdup ("GVFS_REMOTE_VOLUME_MONITOR_IGNORE"), g_strdup ("1")); + /* Inital setup needs gvfs for fetching remote avatars. */ + if (strcmp (launch_environment->priv->session_mode, INITIAL_SETUP_SESSION_MODE) != 0) { + g_hash_table_insert (hash, g_strdup ("GVFS_DISABLE_FUSE"), g_strdup ("1")); + g_hash_table_insert (hash, g_strdup ("GIO_USE_VFS"), g_strdup ("local")); + g_hash_table_insert (hash, g_strdup ("GVFS_REMOTE_VOLUME_MONITOR_IGNORE"), g_strdup ("1")); + } } g_hash_table_insert (hash, g_strdup ("LOGNAME"), g_strdup (launch_environment->priv->user_name)); -- cgit v1.2.1