Merge pull request #6344 from Laserlicht/crashfix

fix crash if second level does not exists
This commit is contained in:
Ivan Savenko authored and GitHub committed 2025-11-24 10:14:16 +02:00
commit 045251bdc2
1 file changed
+3 -2
+3 -2
View File
@@ -535,8 +535,9 @@ void CGSubterraneanGate::postInit(IGameInfoCallback * cb) //matches subterranean
}
// we should assign empty channels to underground gates if they don't have matching overground gates
for(auto & i : gatesSplit[1])
assignToChannel(i);
if(gatesSplit.size() > 1)
for(auto & i : gatesSplit[1])
assignToChannel(i);
}
void CGWhirlpool::onHeroVisit(IGameEventCallback & gameEvents, const CGHeroInstance * h) const