Fix a bug that could cause crashes.

This commit is contained in:
JoelKatz
2013-02-21 19:29:25 -08:00
parent 716631bb5c
commit 5b383d43b0

View File

@@ -71,6 +71,8 @@ void PeerSet::TimerEntry(boost::weak_ptr<PeerSet> wptr, const boost::system::err
{ {
if (result == boost::asio::error::operation_aborted) if (result == boost::asio::error::operation_aborted)
return; return;
ScopedLock sl(theApp->getMasterLock());
boost::shared_ptr<PeerSet> ptr = wptr.lock(); boost::shared_ptr<PeerSet> ptr = wptr.lock();
if (ptr) if (ptr)
ptr->invokeOnTimer(); ptr->invokeOnTimer();