[gdm/multi-stack: 21/35] Prevent start session signal handler from getting called multiple times
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/multi-stack: 21/35] Prevent start session signal handler from getting called multiple times
- Date: Fri, 4 Feb 2011 20:13:50 +0000 (UTC)
commit 2b0d305e443e92d36850c95f680c355eb6b5e0cb
Author: Ray Strode <rstrode redhat com>
Date: Wed Oct 28 11:13:10 2009 -0400
Prevent start session signal handler from getting called multiple times
It was causing a double free.
gui/simple-greeter/gdm-greeter-login-window.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index 3fcfcce..c3725e5 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -1085,8 +1085,17 @@ on_ready_to_start_session (GdmGreeterLoginWindow *login_window,
GParamSpec *param_spec,
char *service_name)
{
+ if (!login_window->priv->is_interactive) {
+ return;
+ }
+
gdm_greeter_login_window_start_session_when_ready (login_window, service_name);
g_free (service_name);
+
+ if (login_window->priv->start_session_handler_id > 0) {
+ g_signal_handler_disconnect (login_window, login_window->priv->start_session_handler_id);
+ login_window->priv->start_session_handler_id = 0;
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]