1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-13 14:53:46 +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:
Bryan Roe
2022-10-31 15:22:39 -07:00
parent 0bcab07f58
commit 0520e66dc6

View File

@@ -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);
if (master->child != NULL)
{
ILibProcessPipe_Process_RemoveHandlers(master->child);
ILibProcessPipe_Process_SoftKill(master->child);
}
else if (master->PeerChain != NULL)