From ba113b63e5ee8e76638ae8f02f7220fb1b8fcdce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Fri, 31 Jul 2009 00:14:58 +0200
Subject: Remove assertion that is triggered on unregister().


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);
-- 
cgit v0.10.2-6-g49f6