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

Merge branch 'fix_crash_on_travel' into 'master'

Fix crash on travelling using silt strider

See merge request OpenMW/openmw!1937
This commit is contained in:
psi29a 2022-05-27 18:38:29 +00:00
commit 1d597888ec

View File

@ -2249,9 +2249,10 @@ namespace MWMechanics
if (!MWBase::Environment::get().getMechanicsManager()->isAIActive())
return;
for (const Actor& actor : mActors)
for (auto it = mActors.begin(); it != mActors.end();)
{
const MWWorld::Ptr ptr = actor.getPtr();
const MWWorld::Ptr ptr = it->getPtr();
++it;
if (ptr == getPlayer()
|| !isConscious(ptr)
|| ptr.getClass().getCreatureStats(ptr).isParalyzed())