From a1ae01e3920ff91cdc5c51c4e37d9c6b3f81f97b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 7 Jan 2019 01:09:19 +0100 Subject: [PATCH] - fixed last PR. The result of GetPointer must be null checked as well! --- wadsrc/static/zscript/actor_inventory.txt | 4 ++++ 1 file changed, 4 insertions(+) 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)