1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Merge branch 'placeatmecrash' into 'master'

Don't crash the game when placing a non-actor

See merge request OpenMW/openmw!443
This commit is contained in:
psi29a 2020-12-08 17:37:01 +00:00
commit afaacedf67

View File

@ -1345,7 +1345,11 @@ namespace MWWorld
moveObject(ptr, ptr.getCell(), pos.x(), pos.y(), pos.z());
if (force) // force physics to use the new position
mPhysics->getActor(ptr)->resetPosition();
{
auto actor = mPhysics->getActor(ptr);
if(actor)
actor->resetPosition();
}
}
void World::fixPosition()