From dfcf27aac8509b15198d252e4084b5a54c26e38e Mon Sep 17 00:00:00 2001 From: Alvin Zhu Date: Wed, 22 Mar 2023 16:24:41 +0800 Subject: [PATCH] fix crash null QuestItemList --- src/LootObjectStack.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/LootObjectStack.cpp b/src/LootObjectStack.cpp index 4f417e3c..2f915ae1 100644 --- a/src/LootObjectStack.cpp +++ b/src/LootObjectStack.cpp @@ -83,6 +83,9 @@ void LootObject::Refresh(Player* bot, ObjectGuid lootGUID) bool isQuestItemOnly = false; GameObjectQuestItemList const* items = sObjectMgr->GetGameObjectQuestItemList(go->GetEntry()); + if (!items) + return; + for (int i = 0; i < MAX_GAMEOBJECT_QUEST_ITEMS; i++) { if (i >= items->size())