diff --git a/wadsrc/static/zscript/actor_inventory.txt b/wadsrc/static/zscript/actor_inventory.txt index 485194d9a..ec9b7d8d4 100644 --- a/wadsrc/static/zscript/actor_inventory.txt +++ b/wadsrc/static/zscript/actor_inventory.txt @@ -393,14 +393,14 @@ extend class Actor { int paramnum = 0; - if (!orresult) - { - receiver = receiver.GetPointer(setreceiver); - } if (receiver == NULL) { // If there's nothing to receive it, it's obviously a fail, right? return false; } + if (!orresult) + { + receiver = receiver.GetPointer(setreceiver); + } // 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) {