From 6c3c8a5b250655fdd0bdf7dfb07f65d66ffdf624 Mon Sep 17 00:00:00 2001 From: Mike Gorse Date: Fri, 31 Aug 2012 13:24:19 -0500 Subject: [PATCH] Remove erroneous assert from connection_setup_add_timeout When switching a connection from one main loop to another, timeouts are moved to the new connection, so connection_setup_add_timeout gets called on the new connection for all timeouts that were set on the old connection. This means that the timeout's data can, in fact, be non-NULL, and it will be freed / removed from the old connection as a side-effect of adding it to the new connection. A similar assert was removed from dbus_connection_add_watch a while ago as part of the original patch for this bug. https://bugs.freedesktop.org/show_bug.cgi?id=30574 --- dbus/dbus-gmain.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dbus/dbus-gmain.c b/dbus/dbus-gmain.c index 6cf5af5..c397f89 100644 --- a/dbus/dbus-gmain.c +++ b/dbus/dbus-gmain.c @@ -344,8 +344,6 @@ connection_setup_add_timeout (ConnectionSetup *cs, if (!dbus_timeout_get_enabled (timeout)) return; - g_assert (dbus_timeout_get_data (timeout) == NULL); - handler = g_new0 (TimeoutHandler, 1); handler->cs = cs; handler->timeout = timeout; -- 1.7.10.3