summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/LinkLocal/LinkLocalServiceBrowser.cpp')
-rw-r--r--Swiften/LinkLocal/LinkLocalServiceBrowser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/LinkLocal/LinkLocalServiceBrowser.cpp b/Swiften/LinkLocal/LinkLocalServiceBrowser.cpp
index b24d8f0..061bf2c 100644
--- a/Swiften/LinkLocal/LinkLocalServiceBrowser.cpp
+++ b/Swiften/LinkLocal/LinkLocalServiceBrowser.cpp
@@ -100,11 +100,12 @@ void LinkLocalServiceBrowser::handleServiceAdded(const DNSSDServiceID& service)
}
void LinkLocalServiceBrowser::handleServiceRemoved(const DNSSDServiceID& service) {
- if (selfService && service == *selfService) {
+ ResolveQueryMap::iterator i = resolveQueries.find(service);
+ if (i == resolveQueries.end()) {
+ // Can happen after an unregister(), when getting the old 'self'
+ // service remove notification.
return;
}
- ResolveQueryMap::iterator i = resolveQueries.find(service);
- assert(i != resolveQueries.end());
i->second->stop();
resolveQueries.erase(i);
ServiceMap::iterator j = services.find(service);