Skip to content

Commit 237d48e

Browse files
committed
fix: ensure onUnload is invoked prior to engine cleanup
1 parent 109c747 commit 237d48e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lse/PluginManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,10 @@ ll::Expected<> PluginManager::unload(std::string_view name) {
257257

258258
{
259259
EngineScope scope(scriptEngine);
260+
LLSECallEventsOnUnload(scriptEngine);
260261
#ifndef LSE_BACKEND_NODEJS
261262
LLSERemoveTimeTaskData(scriptEngine);
262263
#endif
263-
LLSECallEventsOnUnload(scriptEngine);
264264
LLSERemoveAllEventListeners(scriptEngine);
265265
LLSERemoveCmdRegister(scriptEngine);
266266
LLSERemoveCmdCallback(scriptEngine);

0 commit comments

Comments
 (0)