From 4e25c7acd22515368575e2673d921832b99c32fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be> Date: Wed, 27 Apr 2011 18:50:55 +0200 Subject: Keep shared_ptr of PlatformDomainNameServiceQuery in event loop. Release-Notes: Fixed potential crash when losing network connection during login. diff --git a/Swiften/Network/PlatformDomainNameServiceQuery.cpp b/Swiften/Network/PlatformDomainNameServiceQuery.cpp index 24adde5..7d8074d 100644 --- a/Swiften/Network/PlatformDomainNameServiceQuery.cpp +++ b/Swiften/Network/PlatformDomainNameServiceQuery.cpp @@ -160,7 +160,7 @@ void PlatformDomainNameServiceQuery::runBlocking() { std::sort(records.begin(), records.end(), ResultPriorityComparator()); //std::cout << "Sending out " << records.size() << " SRV results " << std::endl; - eventLoop->postEvent(boost::bind(boost::ref(onResult), records)); + eventLoop->postEvent(boost::bind(boost::ref(onResult), records), shared_from_this()); } void PlatformDomainNameServiceQuery::emitError() { -- cgit v0.10.2-6-g49f6