From b4ba7dfec2d7c0aa104b38daaff4cc5984270483 Mon Sep 17 00:00:00 2001 From: Chronos Ouroboros Date: Mon, 30 Dec 2019 12:33:30 -0300 Subject: [PATCH] Fixed a regression in DoTakeInventory. (the C++ code just ignored the null pointer, but ZScript can't do that) --- wadsrc/static/zscript/actors/inventory_util.zs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wadsrc/static/zscript/actors/inventory_util.zs b/wadsrc/static/zscript/actors/inventory_util.zs index d64625109..6b65b6420 100644 --- a/wadsrc/static/zscript/actors/inventory_util.zs +++ b/wadsrc/static/zscript/actors/inventory_util.zs @@ -504,6 +504,10 @@ extend class Actor { return false; } + if (receiver == NULL) + { + return false; + } if (!orresult) { receiver = receiver.GetPointer(setreceiver);