]> git.meshlink.io Git - catta/blobdiff - avahi-daemon/dbus-service-type-browser.c
work around a limitation in Gentoo's DBUS build (which is compiled with --disable...
[catta] / avahi-daemon / dbus-service-type-browser.c
index ac2a17cc367d4b286396d67d780cfaeb64c8e4a7..9207a74f049a058ba83aeaf92dec752d5c1f5e3c 100644 (file)
@@ -38,8 +38,12 @@ void avahi_dbus_service_type_browser_free(ServiceTypeBrowserInfo *i) {
 
     if (i->service_type_browser)
         avahi_s_service_type_browser_free(i->service_type_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(ServiceTypeBrowserInfo, service_type_browsers, i->client->service_type_browsers, i);
 
     i->client->n_objects--;