diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-04-27 16:50:55 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-04-27 16:50:55 (GMT) |
commit | 4e25c7acd22515368575e2673d921832b99c32fa (patch) | |
tree | 1b185e0e35218ff27306dad108fb94b387e6f84c /Swiften | |
parent | 2804a822e82819535f35e8689a10736db679a19b (diff) | |
download | swift-contrib-4e25c7acd22515368575e2673d921832b99c32fa.zip swift-contrib-4e25c7acd22515368575e2673d921832b99c32fa.tar.bz2 |
Keep shared_ptr of PlatformDomainNameServiceQuery in event loop.
Release-Notes: Fixed potential crash when losing network connection during login.
Diffstat (limited to 'Swiften')
-rw-r--r-- | Swiften/Network/PlatformDomainNameServiceQuery.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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() { |