Core/Spells: Fixed possible crash

This commit is contained in:
vincent-michael
2017-02-25 00:05:21 +01:00
parent bfe4733195
commit a4c226eecc

View File

@@ -5464,6 +5464,9 @@ void Spell::EffectGiveCurrency(SpellEffIndex /*effIndex*/)
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
if (!sCurrencyTypesStore.LookupEntry(effectInfo->MiscValue))
return;
unitTarget->ToPlayer()->ModifyCurrency(effectInfo->MiscValue, damage);
}