1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-11-09 12:56:40 +00:00

Merge branch 'fix_crash' into 'master'

Fix removing heightfield from navigator (#6181)

Closes #6181

See merge request OpenMW/openmw!1062
This commit is contained in:
Evil Eye 2021-07-27 19:21:19 +00:00
commit b1a3fc9399

View file

@ -397,8 +397,8 @@ namespace MWWorld
if (cell->getCell()->isExterior()) if (cell->getCell()->isExterior())
{ {
if (const auto heightField = mPhysics->getHeightField(cellX, cellY)) if (mPhysics->getHeightField(cellX, cellY) != nullptr)
mNavigator.removeObject(DetourNavigator::ObjectId(heightField)); mNavigator.removeHeightfield(osg::Vec2i(cellX, cellY));
} }
if (cell->getCell()->hasWater()) if (cell->getCell()->hasWater())