[gnome-session] client: don't try to access client after it's vanished
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] client: don't try to access client after it's vanished
- Date: Mon, 14 Mar 2016 20:26:48 +0000 (UTC)
commit a8be66fa51e5fe76161f69f2085b6b22192ad451
Author: Ray Strode <rstrode redhat com>
Date: Wed Mar 9 13:47:16 2016 -0500
client: don't try to access client after it's vanished
After we emit the disconnected signal on the client it's likely
to get freed, so don't try to use it from that point forward.
https://bugzilla.gnome.org/show_bug.cgi?id=763169
gnome-session/gsm-dbus-client.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gnome-session/gsm-dbus-client.c b/gnome-session/gsm-dbus-client.c
index 598df4e..e5b9985 100644
--- a/gnome-session/gsm-dbus-client.c
+++ b/gnome-session/gsm-dbus-client.c
@@ -225,9 +225,11 @@ on_client_vanished (GDBusConnection *connection,
gpointer user_data)
{
GsmDBusClient *client = user_data;
- gsm_client_disconnected (GSM_CLIENT (client));
g_bus_unwatch_name (client->priv->watch_id);
+ client->priv->watch_id = 0;
+
+ gsm_client_disconnected (GSM_CLIENT (client));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]