Fix ArrayDestroy/DestroyStack erroring on null handle
This commit is contained in:
parent
c071f53f2c
commit
78f577686a
|
@ -661,6 +661,12 @@ static cell AMX_NATIVE_CALL ArrayDeleteItem(AMX* amx, cell* params)
|
|||
static cell AMX_NATIVE_CALL ArrayDestroy(AMX* amx, cell* params)
|
||||
{
|
||||
cell* handle = get_amxaddr(amx, params[1]);
|
||||
|
||||
if (*handle == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
CellArray* vec = HandleToVector(amx, *handle);
|
||||
|
||||
if (vec == NULL)
|
||||
|
|
|
@ -241,6 +241,12 @@ static cell AMX_NATIVE_CALL IsStackEmpty(AMX* amx, cell* params)
|
|||
static cell AMX_NATIVE_CALL DestroyStack(AMX* amx, cell* params)
|
||||
{
|
||||
cell *handle = get_amxaddr(amx, params[1]);
|
||||
|
||||
if (*handle == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
CellArray *vec = HandleToVector(amx, *handle);
|
||||
|
||||
if (vec == NULL)
|
||||
|
|
Loading…
Reference in New Issue
Block a user