mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-08 11:33:42 +00:00
Added gaurd, to abort dispatch if the HECI object was GC'ed.
This commit is contained in:
@@ -768,6 +768,8 @@ void ILibDuktape_HECI_IoctlHandler_Dispatch(void *chain, void *user)
|
|||||||
int i;
|
int i;
|
||||||
duk_context *ctx = data->ctx;
|
duk_context *ctx = data->ctx;
|
||||||
|
|
||||||
|
if (!ILibMemory_CanaryOK(data)) { return; } // Abort Dispatch, becuase the HECI object was GC'ed.
|
||||||
|
|
||||||
duk_push_heapptr(data->ctx, data->data); // [array]
|
duk_push_heapptr(data->ctx, data->data); // [array]
|
||||||
duk_push_heapptr(data->ctx, data->heciObject); // [array][heci]
|
duk_push_heapptr(data->ctx, data->heciObject); // [array][heci]
|
||||||
duk_get_prop_index(data->ctx, -2, 2); // [array][heci][callback]
|
duk_get_prop_index(data->ctx, -2, 2); // [array][heci][callback]
|
||||||
|
|||||||
Reference in New Issue
Block a user