From 779ec6e55c288e6ba5fad2c99a04fbac4aa250e1 Mon Sep 17 00:00:00 2001 From: psi29a Date: Sun, 25 Sep 2022 13:30:07 +0000 Subject: [PATCH] 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 --- apps/openmw/mwmechanics/activespells.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/openmw/mwmechanics/activespells.cpp b/apps/openmw/mwmechanics/activespells.cpp index 7ee3aedbb8..e9c72f884f 100644 --- a/apps/openmw/mwmechanics/activespells.cpp +++ b/apps/openmw/mwmechanics/activespells.cpp @@ -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};