Преглед изворни кода

Protect lakes accessed from both zones with lock

Tomasz Zieliński пре 1 година
родитељ
комит
6d9f83a376
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      lib/rmg/modificators/WaterProxy.cpp

+ 1 - 0
lib/rmg/modificators/WaterProxy.cpp

@@ -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))