[gdm/gnome-2-30] Only set WINDOWPATH if it is not NULL.



commit eef9fec895f1411066cb15c64be10e5e84b565e0
Author: Brian Cameron <brian cameron oracle com>
Date:   Thu Jun 2 09:56:41 2011 -0500

    Only set WINDOWPATH if it is not NULL.

 daemon/gdm-session-direct.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/daemon/gdm-session-direct.c b/daemon/gdm-session-direct.c
index d1fec90..73c34e2 100644
--- a/daemon/gdm-session-direct.c
+++ b/daemon/gdm-session-direct.c
@@ -2047,6 +2047,8 @@ gdm_session_direct_set_environment_variable (GdmSessionDirect *session,
 static void
 setup_session_environment (GdmSessionDirect *session)
 {
+        char *windowpath;
+
         gdm_session_direct_set_environment_variable (session,
                                                      "GDMSESSION",
                                                      get_session_name (session));
@@ -2078,10 +2080,12 @@ setup_session_environment (GdmSessionDirect *session)
                                                              session->priv->user_x11_authority_file);
         }
 
-        gdm_session_direct_set_environment_variable (session,
-                                                     "WINDOWPATH",
-                                                     g_getenv ("WINDOWPATH"));
-
+        windowpath = g_getenv ("WINDOWPATH");
+        if (windowpath != NULL) {
+                gdm_session_direct_set_environment_variable (session,
+                                                             "WINDOWPATH",
+                                                             windowpath);
+        }
 
         /* FIXME: We do this here and in the session worker.  We should consolidate
          * somehow.



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