mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-01 22:11:33 +00:00
Merge branch 'recall_how_to_recall' into 'master'
Prevent recursive calls to ActiveSpells::update Closes #7022 See merge request OpenMW/openmw!2426 (cherry picked from commitd38c072030
)d3253cb6
Prevent recursive calls to ActiveSpells::update
This commit is contained in:
parent
960934afee
commit
779ec6e55c
1 changed files with 2 additions and 0 deletions
|
@ -148,6 +148,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};
|
||||
|
|
Loading…
Reference in a new issue