Преглед изворни кода

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;