From b58cc1d790f368a7f750f583e9691eae3464ff76 Mon Sep 17 00:00:00 2001 From: ShrBox Date: Sat, 11 May 2024 13:19:55 +0800 Subject: [PATCH] fix: fix unload #134 --- src/lse/PluginManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lse/PluginManager.cpp b/src/lse/PluginManager.cpp index e6fe655..bba5832 100644 --- a/src/lse/PluginManager.cpp +++ b/src/lse/PluginManager.cpp @@ -265,6 +265,8 @@ ll::Expected<> PluginManager::unload(std::string_view name) { #else scriptEngine.destroy(); // TODO: use unique_ptr to manage the engine. #endif + erasePlugin(name); + return {}; } catch (const std::exception& e) { return ll::makeStringError("Failed to unload plugin {}: {}"_tr(name, e.what()));