Add null check for loot drops (#1243)

fixes a crash
This commit is contained in:
David Markowitz 2023-10-28 03:32:19 -07:00 committed by GitHub
parent 79752c9abc
commit 65c743527e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1029,7 +1029,7 @@ void GameMessages::SendSetNetworkScriptVar(Entity* entity, const SystemAddress&
} }
void GameMessages::SendDropClientLoot(Entity* entity, const LWOOBJID& sourceID, LOT item, int currency, NiPoint3 spawnPos, int count) { void GameMessages::SendDropClientLoot(Entity* entity, const LWOOBJID& sourceID, LOT item, int currency, NiPoint3 spawnPos, int count) {
if (Game::config->GetValue("disable_drops") == "1") { if (Game::config->GetValue("disable_drops") == "1" || !entity) {
return; return;
} }