Преглед на файлове

crash fix for non entity handle loot

Emagi преди 9 месеца
родител
ревизия
a55fda41b5
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      EQ2/source/WorldServer/client.cpp

+ 1 - 1
EQ2/source/WorldServer/client.cpp

@@ -2761,7 +2761,7 @@ bool Client::HandleLootItem(Spawn* entity, Item* item, Spawn* target, bool overr
 	}
 
 	// needs to only be checked before expiration of loot restrictions
-	if (!overrideLootRestrictions) {
+	if (entity && !overrideLootRestrictions) {
 		if (entity->GetLootGroupID() > 0 && (!lootingPlayer->GetGroupMemberInfo() || lootingPlayer->GetGroupMemberInfo()->group_id != entity->GetLootGroupID())) {
 			LogWrite(LOOT__ERROR, 0, "Loot", "%s: Loot Group ID from %s did not match Item: %s (%u), expected group id %u.", entity->GetName(), lootingPlayer->GetName(), item->name.c_str(), item->details.item_id, entity->GetLootGroupID());
 			return false;