Call the DEINIT_PLUGIN hook after before unloading a plugin

This commit is contained in:
Maschell 2022-10-03 16:27:58 +02:00
parent 178085750d
commit 5303e05508

View File

@ -77,6 +77,7 @@ WUMS_APPLICATION_STARTS() {
if (!gLoadOnNextLaunch.empty()) {
DEBUG_FUNCTION_LINE("Restore function patches of currently loaded plugins.");
PluginManagement::RestoreFunctionPatches(gLoadedPlugins);
CallHook(gLoadedPlugins, WUPS_LOADER_HOOK_DEINIT_PLUGIN);
DEBUG_FUNCTION_LINE("Unload existing plugins.");
gLoadedPlugins.clear();
DEBUG_FUNCTION_LINE("Load new plugins");