From 7ae2c9cd92adb41e4bdeac1fc1d4832b81a718bd Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 19 Mar 2012 14:07:35 -0400 Subject: user-switching: don't bail if login screen isn't running It's okay if no login screen is running, we can just launch one. https://bugzilla.gnome.org/show_bug.cgi?id=655380 --- utils/gdmflexiserver.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'utils') diff --git a/utils/gdmflexiserver.c b/utils/gdmflexiserver.c index 4e07413a..e4d8a324 100644 --- a/utils/gdmflexiserver.c +++ b/utils/gdmflexiserver.c @@ -819,6 +819,8 @@ goto_login_session_for_systemd (DBusConnection *connection, char *seat_id; ret = FALSE; + session_id = NULL; + seat_id = NULL; /* First look for any existing LoginWindow sessions on the seat. If none are found, create a new one. */ @@ -863,14 +865,7 @@ goto_login_session_for_systemd (DBusConnection *connection, } res = get_login_window_session_id_for_systemd (seat_id, &session_id); - if (! res) { - free (seat_id); - - g_set_error (error, GDM_FLEXISERVER_ERROR, 1, _("The system is unable to find a login screen to switch to.")); - return FALSE; - } - - if (session_id != NULL) { + if (res && session_id != NULL) { res = activate_session_id_for_systemd (connection, seat_id, session_id); if (res) { -- cgit v1.2.1