Fix iterator usage when destroying cell borders (bug #5218)

pull/556/head
Andrei Kortunov 5 years ago
parent 407a737fe4
commit 5daf602256

@ -177,6 +177,7 @@
Bug #5210: AiActivate allows actors to open dialogue and inventory windows
Bug #5211: Screen fades in if the first loaded save is in interior cell
Bug #5213: SameFaction script function is broken
Bug #5218: Crash when disabling ToggleBorders
Feature #1774: Handle AvoidNode
Feature #2229: Improve pathfinding AI
Feature #3025: Analogue gamepad movement controls

@ -91,8 +91,9 @@ void CellBorder::destroyCellBorderGeometry(int x, int y)
void CellBorder::destroyCellBorderGeometry()
{
for (CellGrid::iterator it = mCellBorderNodes.begin(); it != mCellBorderNodes.end(); ++it)
destroyCellBorderGeometry(it->first.first,it->first.second);
for (const auto& v : mCellBorderNodes)
mRoot->removeChild(v.second);
mCellBorderNodes.clear();
}
}

Loading…
Cancel
Save