From: Mario Date: Mon, 30 Nov 2020 09:40:10 +0000 (+1000) Subject: Don't attempt to delete a null entity when removing inventories X-Git-Tag: xonotic-v0.8.5~588^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bf4952b7bd55443ed9c4edd42ccb313f0d1fef5c;p=xonotic%2Fxonotic-data.pk3dir.git Don't attempt to delete a null entity when removing inventories --- diff --git a/qcsrc/common/items/inventory.qh b/qcsrc/common/items/inventory.qh index c47be6699..87c85198d 100644 --- a/qcsrc/common/items/inventory.qh +++ b/qcsrc/common/items/inventory.qh @@ -133,7 +133,7 @@ void Inventory_new(PlayerState this) setcefc(inv, Inventory_customize); Net_LinkEntity((inv.owner = this).inventory = inv, false, 0, Inventory_Send); } -void Inventory_delete(entity e) { delete(e.inventory.inventory); delete(e.inventory); } +void Inventory_delete(entity e) { delete(e.inventory); } void Inventory_update(entity e) { e.inventory.SendFlags = 0xFFFFFF; } void InventoryStorage_attach(entity e) { e.inventory_store = NEW(Inventory); e.inventory_store.drawonlytoclient = e; }