summaryrefslogtreecommitdiffstats
path: root/glib/dbus-gmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'glib/dbus-gmain.c')
-rw-r--r--glib/dbus-gmain.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/glib/dbus-gmain.c b/glib/dbus-gmain.c
index 15490fbd..dd9ea375 100644
--- a/glib/dbus-gmain.c
+++ b/glib/dbus-gmain.c
@@ -275,6 +275,10 @@ remove_watch (DBusWatch *watch,
dbus_source->poll_fds = g_list_remove (dbus_source->poll_fds, poll_fd);
g_hash_table_remove (dbus_source->watches, poll_fd);
g_source_remove_poll ((GSource *)dbus_source, poll_fd);
+
+ dbus_watch_set_data (watch, NULL, NULL); /* needed due to watch_toggled
+ * breaking add/remove symmetry
+ */
g_free (poll_fd);
}