diff options
author | Aleksi Lindeman <dec05eba@protonmail.com> | 2018-11-09 12:42:55 +0100 |
---|---|---|
committer | Aleksi Lindeman <dec05eba@protonmail.com> | 2018-11-09 12:42:55 +0100 |
commit | 2b7ed06dcaa149f9ecc800ec17435dca1c04b861 (patch) | |
tree | db6abe8fec9c4672a47d00298dcc229bc091ea0c /src | |
parent | 11ee593a8387cf2ca0bcdbaf0d39ad69bee6dec4 (diff) |
Maybe this will fix crash...
Diffstat (limited to 'src')
-rw-r--r-- | src/DirectConnection.cpp | 8 |
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 { |