From 9c010fbc04a450cc13484682abfbecd31f610305 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 25 Apr 2003 20:41:49 +0000 Subject: 2003-04-25 Havoc Pennington * glib/dbus-gmain.c (remove_watch): fix for a crash when watches were toggled without add/remove, fix from Anders Gustafsson --- glib/dbus-gmain.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'glib/dbus-gmain.c') 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); } -- cgit