1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

fix segmentation fault; update townlist on adventuremap

This commit is contained in:
Laserlicht
2023-10-15 15:53:19 +02:00
committed by GitHub
parent 3b853bff08
commit 4528f42cdf
5 changed files with 27 additions and 23 deletions

View File

@ -274,4 +274,6 @@ void PlayerLocalState::swapOwnedTowns(int pos1, int pos2)
{
assert(ownedTowns[pos1] && ownedTowns[pos2]);
std::swap(ownedTowns[pos1], ownedTowns[pos2]);
adventureInt->onTownOrderChanged();
}