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:
commit
afaacedf67
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user