From 5c86a1e6b5be9c1106756056ad0870c4bcc17d2e Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 4 Apr 2019 13:23:08 +0300 Subject: [PATCH] - fixed crash with push/insert to null dynarray when JIT is on https://forum.zdoom.org/viewtopic.php?t=64148 --- src/scripting/backend/dynarrays.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scripting/backend/dynarrays.cpp b/src/scripting/backend/dynarrays.cpp index b95e02f4d..d01a4557b 100644 --- a/src/scripting/backend/dynarrays.cpp +++ b/src/scripting/backend/dynarrays.cpp @@ -783,6 +783,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_Obj, Find, ArrayFindPush(obj); } @@ -811,6 +812,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_Obj, Delete, ArrayDelete) void ObjArrayInsert(FDynArray_Obj *self,int index, DObject *obj) { + if (self == nullptr) NullParam("\"self\""); GC::WriteBarrier(obj); self->Insert(index, obj); }