summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-06-16 15:33:01 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-08-15 10:47:42 +0100
commit36b55c3aac5de873a69c9bd0fbe003200a03ba32 (patch)
tree16e8b31efd3bfcf0b5405d37778fdd948fc9bdf5
parent18705c42ca6b6a583b64451055eec4dad3aaa3b4 (diff)
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: https://bugs.freedesktop.org/show_bug.cgi?id=38408 Bug-NB: NB#116862 Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
-rw-r--r--dbus/dbus-gproxy.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/dbus/dbus-gproxy.c b/dbus/dbus-gproxy.c
index 6d65033..ee5d2bd 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