1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 15:29:55 +00:00

Merge branch 'recall_how_to_recall' into 'master'

Prevent recursive calls to ActiveSpells::update

Closes #7022

See merge request OpenMW/openmw!2426
This commit is contained in:
psi29a 2022-09-25 13:30:07 +00:00
commit d38c072030

View file

@ -184,6 +184,8 @@ namespace MWMechanics
void ActiveSpells::update(const MWWorld::Ptr& ptr, float duration)
{
if (mIterating)
return;
const auto& creatureStats = ptr.getClass().getCreatureStats(ptr);
assert(&creatureStats.getActiveSpells() == this);
IterationGuard guard{ *this };