diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index f627e62ae..a1031f4c8 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -997,7 +997,8 @@ namespace MWMechanics if (!iter->first.getClass().getCreatureStats(iter->first).isDead()) { - updateActor(iter->first, duration); + MWWorld::Ptr actor = iter->first; // make a copy of the map key to avoid it being invalidated when the player teleports + updateActor(actor, duration); if (MWBase::Environment::get().getWorld()->hasCellChanged()) { return; // for now abort update of the old cell when cell changes by teleportation magic effect