1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 16:09:43 +00:00

Prevent recursive calls to ActiveSpells::update

This commit is contained in:
Evil Eye 2022-09-24 18:13:45 +02:00
parent 6d3de520e8
commit d3253cb636

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 };