From a4a5729d27a3d3bb3ce544615a823c8b09fe2ffd Mon Sep 17 00:00:00 2001 From: Shtrecker Date: Wed, 2 Oct 2024 00:14:53 +0300 Subject: [PATCH] Fix spawn event --- src/xrGame/Inventory.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xrGame/Inventory.cpp b/src/xrGame/Inventory.cpp index 6017969fb..39571551e 100644 --- a/src/xrGame/Inventory.cpp +++ b/src/xrGame/Inventory.cpp @@ -1253,10 +1253,11 @@ CInventoryItem *CInventory::GetItemFromInventory(LPCSTR caItemName) return (0); } - bool CInventory::CanTakeItem(CInventoryItem *inventory_item) const { - VERIFY (inventory_item); + if (inventory_item == nullptr) + return false; + VERIFY (m_pOwner); if (inventory_item->object().getDestroy()) return false;