1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 04:39:42 +00:00

Merge branch 'absorption' into 'master'

Restore empty target check in spell absorption

See merge request OpenMW/openmw!338
This commit is contained in:
Alexei Dobrohotov 2020-10-10 19:08:14 +00:00
commit b85d507f35

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);