]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't attempt to delete a null entity when removing inventories
authorMario <zacjardine@y7mail.com>
Mon, 30 Nov 2020 09:40:10 +0000 (19:40 +1000)
committerMario <zacjardine@y7mail.com>
Mon, 30 Nov 2020 09:40:10 +0000 (19:40 +1000)
qcsrc/common/items/inventory.qh

index c47be669978bb90b00afa5724297fc7d21c48544..87c85198d5c0c9adafdd8b2b9a1caf161b3688b6 100644 (file)
@@ -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; }