Various: Fix coverity reported issues.

This commit is contained in:
treeston
2016-10-04 13:49:05 +02:00
parent 9638c11453
commit 84cf239fda
5 changed files with 9 additions and 53 deletions

View File

@@ -4262,8 +4262,10 @@ class spell_gen_pony_mount_check : public SpellScriptLoader
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
Unit* caster = GetCaster();
if (!caster)
return;
Player* owner = caster->GetOwner()->ToPlayer();
if (!caster || !owner || !owner->HasAchieved(ACHIEV_PONY_UP))
if (!owner || !owner->HasAchieved(ACHIEV_PONY_UP))
return;
if (owner->IsMounted())