[gdm] launch-environment: fix crasher when session-mode isn't set



commit a1277882f1ee62318715cf7a9a93a7669aaad218
Author: Ray Strode <rstrode redhat com>
Date:   Mon Mar 27 16:56:29 2017 -0400

    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 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
index a30276b..4372ac2 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));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]