aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2024-07-11 16:00:58 +0200
committerGitHub <noreply@github.com>2024-07-11 16:00:58 +0200
commit0af322637926ee68bf721194956da23aaa0c754f (patch)
tree9204bff5b8c583e3453ceb9f83665a901ce513ac /src
parent2844d79ead9c77edb89fb7caadf08909d13a3777 (diff)
Core/Player: fixed a crash in rewarding quests when a QuestRewardDisplay spell is 0 (in classic the container is an array instead of a vector)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index d246a1ba019..338461967d8 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -14714,7 +14714,7 @@ void Player::RewardQuest(Quest const* quest, LootItemType rewardType, uint32 rew
{
for (QuestRewardDisplaySpell displaySpell : quest->RewardDisplaySpell)
{
- if (!ConditionMgr::IsPlayerMeetingCondition(this, displaySpell.PlayerConditionId))
+ if (!displaySpell || !ConditionMgr::IsPlayerMeetingCondition(this, displaySpell.PlayerConditionId))
continue;
SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(displaySpell.SpellId, GetMap()->GetDifficultyID());