mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-17 00:33:33 +00:00
Fixed bug where if ScriptContainer is GC, it did not unhook events, which could result in a crash if the event was dispatched after cleanup
This commit is contained in:
@@ -3765,6 +3765,7 @@ duk_ret_t ILibDuktape_ScriptContainer_Finalizer(duk_context *ctx)
|
|||||||
ILibDuktape_ScriptContainer_Master *master = (ILibDuktape_ScriptContainer_Master*)Duktape_GetBuffer(ctx, -1, NULL);
|
ILibDuktape_ScriptContainer_Master *master = (ILibDuktape_ScriptContainer_Master*)Duktape_GetBuffer(ctx, -1, NULL);
|
||||||
if (master->child != NULL)
|
if (master->child != NULL)
|
||||||
{
|
{
|
||||||
|
ILibProcessPipe_Process_RemoveHandlers(master->child);
|
||||||
ILibProcessPipe_Process_SoftKill(master->child);
|
ILibProcessPipe_Process_SoftKill(master->child);
|
||||||
}
|
}
|
||||||
else if (master->PeerChain != NULL)
|
else if (master->PeerChain != NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user