mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Protect lakes accessed from both zones with lock
This commit is contained in:
parent
f2d870e651
commit
6d9f83a376
@ -219,6 +219,7 @@ bool WaterProxy::waterKeepConnection(const rmg::ZoneConnection & connection, boo
|
||||
const auto & zoneA = connection.getZoneA();
|
||||
const auto & zoneB = connection.getZoneB();
|
||||
|
||||
RecursiveLock lock(externalAccessMutex);
|
||||
for(auto & lake : lakes)
|
||||
{
|
||||
if(lake.neighbourZones.count(zoneA) && lake.neighbourZones.count(zoneB))
|
||||
|
Loading…
Reference in New Issue
Block a user