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()) { if (!gLoadOnNextLaunch.empty()) {
DEBUG_FUNCTION_LINE("Restore function patches of currently loaded plugins."); DEBUG_FUNCTION_LINE("Restore function patches of currently loaded plugins.");
PluginManagement::RestoreFunctionPatches(gLoadedPlugins); PluginManagement::RestoreFunctionPatches(gLoadedPlugins);
CallHook(gLoadedPlugins, WUPS_LOADER_HOOK_DEINIT_PLUGIN);
DEBUG_FUNCTION_LINE("Unload existing plugins."); DEBUG_FUNCTION_LINE("Unload existing plugins.");
gLoadedPlugins.clear(); gLoadedPlugins.clear();
DEBUG_FUNCTION_LINE("Load new plugins"); DEBUG_FUNCTION_LINE("Load new plugins");