Core/Quests: Fixed crash in Player::RewardQuest for scenarios and lfg

Closes #19973
This commit is contained in:
Shauren
2017-07-01 23:26:16 +02:00
parent 77d20127cf
commit d9eed8a3bf

View File

@@ -15310,7 +15310,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
SQLTransaction trans = SQLTransaction(nullptr);
_SaveQuestStatus(trans);
SendQuestReward(quest, questGiver->ToCreature(), XP, !announce);
SendQuestReward(quest, questGiver ? questGiver->ToCreature() : nullptr, XP, !announce);
// cast spells after mark quest complete (some spells have quest completed state requirements in spell_area data)
if (quest->GetRewSpell() > 0)