[Debugger] JSAPI: Fix interval finalizer (#2200)

This commit is contained in:
shyguyhex 2022-02-28 17:57:42 -06:00 committed by GitHub
parent 3eec9435c3
commit efb934165b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -68,10 +68,9 @@ duk_ret_t ScriptAPI::js__IntervalContext_remove(duk_context* ctx)
duk_ret_t ScriptAPI::js__IntervalContext_finalizer(duk_context* ctx)
{
duk_push_this(ctx);
duk_get_prop_string(ctx, -1, "worker");
duk_get_prop_string(ctx, 0, "worker");
CJSIntervalWorker* intervalWorker = (CJSIntervalWorker*)duk_get_pointer(ctx, -1);
if (intervalWorker != nullptr)
{
delete intervalWorker;