1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-31 07:33:38 +00:00

Fixed bug introduced with APC dispatcher where exception is thrown, if first param of 'async' was not an object or function.

This commit is contained in:
Bryan Roe
2019-10-09 10:49:42 -07:00
parent 244eb01869
commit b5e0074392

View File

@@ -1052,7 +1052,7 @@ duk_ret_t ILibDuktape_GenericMarshal_MethodInvokeAsync(duk_context *ctx)
}
}
#ifdef WIN32
if (duk_has_prop_string(ctx, 0, ILibDuktape_GenericMarshal_GlobalSet_Dispatcher))
if (duk_is_object(ctx, 0) && duk_has_prop_string(ctx, 0, ILibDuktape_GenericMarshal_GlobalSet_Dispatcher))
{
Duktape_GlobalGeneric_Data *ggd = (Duktape_GlobalGeneric_Data*)Duktape_GetPointerProperty(ctx, 0, ILibDuktape_GenericMarshal_GlobalSet_Dispatcher);
redirectionPtr = NULL;