From 8751203849708d92605faac2d96dd354a0b62e9e Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Wed, 10 Apr 2024 22:23:41 +0300 Subject: [PATCH] Don't run target-specific spell infliction code when there's no target (#7926) --- apps/openmw/mwmechanics/spellcasting.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwmechanics/spellcasting.cpp b/apps/openmw/mwmechanics/spellcasting.cpp index 2fd250f8c1..a7e27c9ddd 100644 --- a/apps/openmw/mwmechanics/spellcasting.cpp +++ b/apps/openmw/mwmechanics/spellcasting.cpp @@ -188,6 +188,9 @@ namespace MWMechanics for (auto& enam : effects.mList) { + if (target.isEmpty()) + break; + if (enam.mData.mRange != range) continue; const ESM::MagicEffect* magicEffect = store.find(enam.mData.mEffectID);