mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-17 08:26:50 -04: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 commit d38c0720307730180027ee73735f18a8602bda2a) d3253cb6 Prevent recursive calls to ActiveSpells::update
This commit is contained in:
parent
960934afee
commit
779ec6e55c
@ -148,6 +148,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