mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- fixed crash with push/insert to null dynarray when JIT is on
https://forum.zdoom.org/viewtopic.php?t=64148
This commit is contained in:
parent
bf58c6aaee
commit
5c86a1e6b5
1 changed files with 2 additions and 0 deletions
|
@ -783,6 +783,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_Obj, Find, ArrayFind<FDynArray_Obj COMMA
|
|||
|
||||
int ObjArrayPush(FDynArray_Obj *self, DObject *obj)
|
||||
{
|
||||
if (self == nullptr) NullParam("\"self\"");
|
||||
GC::WriteBarrier(obj);
|
||||
return self->Push(obj);
|
||||
}
|
||||
|
@ -811,6 +812,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_Obj, Delete, ArrayDelete<FDynArray_Obj>)
|
|||
|
||||
void ObjArrayInsert(FDynArray_Obj *self,int index, DObject *obj)
|
||||
{
|
||||
if (self == nullptr) NullParam("\"self\"");
|
||||
GC::WriteBarrier(obj);
|
||||
self->Insert(index, obj);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue