1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-16 16:20:53 +00:00

Restore empty target check in spell absorption

This commit is contained in:
Alexei Dobrohotov 2020-10-10 14:27:52 +03:00
parent 341bcb66f5
commit 1842f546c3

View File

@ -46,7 +46,7 @@ namespace MWMechanics
bool absorbSpell (const std::string& spellId, const MWWorld::Ptr& caster, const MWWorld::Ptr& target)
{
if (spellId.empty() || caster == target || !target.getClass().isActor())
if (spellId.empty() || target.isEmpty() || caster == target || !target.getClass().isActor())
return false;
CreatureStats& stats = target.getClass().getCreatureStats(target);