Author: Fabio Erculiani <lxnay@sabayonlinux.org>
Date: Fri, 08 Aug 2009 09:19 +0000
Subject: Fix DESTOP_SESSION when dmrc is empty and autologin enabled.

---
 daemon/slave.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/daemon/slave.c b/daemon/slave.c
index b52774d..ced9567 100644
--- a/daemon/slave.c
+++ b/daemon/slave.c
@@ -4638,10 +4638,6 @@ gdm_slave_session_start (void)
 		language = g_strdup (usrlang);
 	}
 
-	tmp = gdm_strip_extension (session, ".desktop");
-	g_free (session);
-	session = tmp;
-
 	if (ve_string_empty (session)) {
 		g_free (session);
 		session = find_a_session ();
@@ -4651,6 +4647,10 @@ gdm_slave_session_start (void)
 		}
 	}
 
+	tmp = gdm_strip_extension (session, ".desktop");
+	g_free (session);
+	session = tmp;
+
 	if G_LIKELY (ve_string_empty (language)) {
 		g_free (language);
 		language = NULL;
