From c4ee97bf1fe6ca9caf4f17a2a5a77a620ff7d9d7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 15 Jul 2006 20:15:30 +0000 Subject: work around a limitation in Gentoo's DBUS build (which is compiled with --disable-checks): never try to unregister non-existing object paths from DBUS. (closes #50 - this time for sure) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1235 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-daemon/dbus-record-browser.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'avahi-daemon/dbus-record-browser.c') diff --git a/avahi-daemon/dbus-record-browser.c b/avahi-daemon/dbus-record-browser.c index 0ddd7b8..ea23fe4 100644 --- a/avahi-daemon/dbus-record-browser.c +++ b/avahi-daemon/dbus-record-browser.c @@ -38,8 +38,11 @@ void avahi_dbus_record_browser_free(RecordBrowserInfo *i) { if (i->record_browser) avahi_s_record_browser_free(i->record_browser); - dbus_connection_unregister_object_path(server->bus, i->path); - avahi_free(i->path); + + if (i->path) { + dbus_connection_unregister_object_path(server->bus, i->path); + avahi_free(i->path); + } AVAHI_LLIST_REMOVE(RecordBrowserInfo, record_browsers, i->client->record_browsers, i); i->client->n_objects--; -- cgit