diff --git a/wadsrc/static/zscript/actor_inventory.txt b/wadsrc/static/zscript/actor_inventory.txt index ec9b7d8d4..8fc3c6d5c 100644 --- a/wadsrc/static/zscript/actor_inventory.txt +++ b/wadsrc/static/zscript/actor_inventory.txt @@ -400,6 +400,10 @@ extend class Actor if (!orresult) { receiver = receiver.GetPointer(setreceiver); + if (receiver == NULL) + { + return false; + } } // Owned inventory items cannot own anything because their Inventory pointer is repurposed for the owner's linked list. if (receiver is 'Inventory' && Inventory(receiver).Owner != null)