From d3253cb63612d9f848686ae515c563d77aedf178 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Sat, 24 Sep 2022 18:13:45 +0200 Subject: [PATCH] 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 8cfce2db7e..faeda92a93 100644 --- a/apps/openmw/mwmechanics/activespells.cpp +++ b/apps/openmw/mwmechanics/activespells.cpp @@ -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 };