1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-29 22:20:33 +00:00

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

This commit is contained in:
Andrei Kortunov 2019-11-29 12:26:17 +04:00
parent 407a737fe4
commit 5daf602256
2 changed files with 4 additions and 2 deletions

View File

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

View File

@ -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();
}
}