[Fix] Add crash checks for certain PlayerEventLogs (#4761)

This commit is contained in:
Mitch Freeman authored and GitHub committed 2025-03-07 16:17:36 -06:00
1 parent 7ab32af4dc
commit 9ee095b354
6 files changed
+10 -10

No files matched your search

+1 -1
View File
@@ -1569,7 +1569,7 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
}
}
if (player_event_logs.IsEventEnabled(PlayerEvent::LOOT_ITEM) && !IsPlayerCorpse()) {
if (inst && player_event_logs.IsEventEnabled(PlayerEvent::LOOT_ITEM) && !IsPlayerCorpse()) {
auto e = PlayerEvent::LootItemEvent{
.item_id = inst->GetItem()->ID,
.item_name = inst->GetItem()->Name,