Merge pull request #171 from AlvinZhu/PR5

fix crash null QuestItemList
This commit is contained in:
ZhengPeiRu21 2023-03-22 10:18:54 -06:00 committed by GitHub
commit 45926662db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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())