Core/Misc: Fix static analysis issues reported by Coverity Scan

This commit is contained in:
Giacomo Pozzoni
2019-06-14 10:13:46 +02:00
parent 1dedd5552d
commit f177790618

View File

@@ -332,8 +332,8 @@ class npc_zealot_lorkhan : public CreatureScript
bool roll = roll_chance_i(50);
Creature* target = roll ? (thekal ? thekal : zath) : (zath ? zath : thekal);
if (!target)
return;
// As we check already above to ensure at least 1 out of Thekal/Zath is not null, target must be not null
ASSERT(target);
if (!me->IsWithinMeleeRange(target))
target = roll ? zath : thekal;