mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-07 07:14:55 +00:00
Prevent recursive calls to ActiveSpells::update
This commit is contained in:
parent
6d3de520e8
commit
d3253cb636
@ -184,6 +184,8 @@ namespace MWMechanics
|
|||||||
|
|
||||||
void ActiveSpells::update(const MWWorld::Ptr& ptr, float duration)
|
void ActiveSpells::update(const MWWorld::Ptr& ptr, float duration)
|
||||||
{
|
{
|
||||||
|
if (mIterating)
|
||||||
|
return;
|
||||||
const auto& creatureStats = ptr.getClass().getCreatureStats(ptr);
|
const auto& creatureStats = ptr.getClass().getCreatureStats(ptr);
|
||||||
assert(&creatureStats.getActiveSpells() == this);
|
assert(&creatureStats.getActiveSpells() == this);
|
||||||
IterationGuard guard{ *this };
|
IterationGuard guard{ *this };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user