commit 3e720fa46ba240959ae645f1310f55f1dec11939
Author: Halton Huo <halton.huo@sun.com>
Date:   Thu May 13 14:48:25 2010 +0800

    Check envrioment WINDOWPATH before setting it.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=618510

diff --git a/daemon/gdm-session-direct.c b/daemon/gdm-session-direct.c
index 9aa47fc..7d5b560 100644
--- a/daemon/gdm-session-direct.c
+++ b/daemon/gdm-session-direct.c
@@ -2063,9 +2063,11 @@ setup_session_environment (GdmSessionDirect *session)
                                                              session->priv->user_x11_authority_file);
         }
 
-        gdm_session_direct_set_environment_variable (session,
-                                                     "WINDOWPATH",
-                                                     g_getenv ("WINDOWPATH"));
+        if (g_getenv ("WINDOWPATH") != NULL) {
+                gdm_session_direct_set_environment_variable (session,
+                                                             "WINDOWPATH",
+                                                             g_getenv ("WINDOWPATH"));
+        }
 
 
         /* FIXME: We do this here and in the session worker.  We should consolidate
