diff --git a/src/LootObjectStack.cpp b/src/LootObjectStack.cpp index 2f915ae1..e3f75ae0 100644 --- a/src/LootObjectStack.cpp +++ b/src/LootObjectStack.cpp @@ -83,12 +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()) + if (!items || i >= items->size()) break; auto itemId = uint32((*items)[i]);