From b25c227f2357e351d2c1653fdfdcd1f099ac7f66 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 9 Nov 2018 12:42:55 +0100 Subject: Maybe this will fix crash... --- src/DirectConnection.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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 { -- cgit v1.2.3