diff --git a/src/quickjs_backend.cpp b/src/quickjs_backend.cpp index 7f9afb6def0..f83159c84fc 100644 --- a/src/quickjs_backend.cpp +++ b/src/quickjs_backend.cpp @@ -175,6 +175,8 @@ class quickjs_scripting_instance : public wzapi::scripting_instance { engineToInstanceMap.erase(ctx); + debug(LOG_INFO, "Destroying [%d]:%s/%s", player(), scriptPath().c_str(), scriptName().c_str()); + if (!(JS_IsUninitialized(compiledScriptObj))) { JS_FreeValue(ctx, compiledScriptObj);