Make sure adjustPosition() is safe to call for any actor

pull/593/head
Alexei Dobrohotov 4 years ago
parent c8d85dcf30
commit 201999c4a9

@ -1345,7 +1345,11 @@ namespace MWWorld
moveObject(ptr, ptr.getCell(), pos.x(), pos.y(), pos.z());
if (ptr.getClass().isActor())
mPhysics->getActor(ptr)->resetPosition();
{
MWPhysics::Actor* actor = mPhysics->getActor(ptr);
if (actor)
actor->resetPosition();
}
}
void World::fixPosition()

Loading…
Cancel
Save