From b33b032b3539e9e0704d520c4e64ea26b807c4d9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 16 Jun 2011 15:33:01 +0100 Subject: [PATCH] dbus_g_proxy_manager_unregister: if GetNameOwner failed, don't assert got_name_owner_cb never adds the proxy to the unassociated_proxies list if there is a D-Bus error other than NameHasNoOwner. Based on a patch from Janne Karhunen, for Maemo. Bug-NB: NB#116862 --- dbus/dbus-gproxy.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dbus/dbus-gproxy.c b/dbus/dbus-gproxy.c index 83fe8b9..a8f3fad 100644 --- a/dbus/dbus-gproxy.c +++ b/dbus/dbus-gproxy.c @@ -1089,10 +1089,12 @@ dbus_g_proxy_manager_unregister (DBusGProxyManager *manager, } else { - link = g_slist_find (manager->unassociated_proxies, proxy); - g_assert (link != NULL); - - manager->unassociated_proxies = g_slist_delete_link (manager->unassociated_proxies, link); + link = g_slist_find (manager->unassociated_proxies, proxy); + if (link != NULL) + { + manager->unassociated_proxies = g_slist_delete_link ( + manager->unassociated_proxies, link); + } } } else -- 1.7.5.4