aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DirectConnection.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/DirectConnection.cpp b/src/DirectConnection.cpp
index a00eeea..e5a997f 100644
--- a/src/DirectConnection.cpp
+++ b/src/DirectConnection.cpp
@@ -309,7 +309,13 @@ namespace sibs
if(receivedDataStatus == 0)
{
peersMutex.lock();
- auto peer = peers[receivedDataFromPeer];
+ auto peerIt = peers.find(receivedDataFromPeer);
+ if(peerIt == peers.end())
+ {
+ peersMutex.unlock();
+ continue;
+ }
+ auto peer = peerIt->second;
peersMutex.unlock();
try
{