Core/Misc: Fix some static analysis issues
Add some asserts and additional NULL checks as sanity checks.
This commit is contained in:
1 parent
ada0598bb0
commit
9e99db035f
11 files changed
+47
-23
No files matched your search
@@ -250,8 +250,9 @@ public:
|
||||
target->CastSpell(target, SPELL_SNAKE_WRAP, true);
|
||||
|
||||
if (TempSummon* _me = me->ToTempSummon())
|
||||
if (Creature* sladran = _me->GetSummoner()->ToCreature())
|
||||
sladran->AI()->SetGUID(target->GetGUID(), DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES);
|
||||
if (Unit* summoner = _me->GetSummoner())
|
||||
if (Creature* sladran = summoner->ToCreature())
|
||||
sladran->AI()->SetGUID(target->GetGUID(), DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES);
|
||||
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user