Skip to content

Commit 242d454

Browse files
zimuya4153ShrBox
authored andcommitted
fix: fix plugin executeOnModUnload
1 parent 760e529 commit 242d454

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lse/PluginManager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ ll::Expected<> PluginManager::unload(std::string_view name) {
266266
EngineManager::unregisterEngine(scriptEngine);
267267
scriptEngine->getData().reset();
268268

269+
if (auto plugin = std::static_pointer_cast<Plugin>(getMod(name))) {
270+
plugin->onUnload();
271+
}
272+
269273
eraseMod(name);
270274

271275
auto destroyEngine = [scriptEngine]() {

0 commit comments

Comments
 (0)