Only call fini when the plugin will be unloaded

This commit is contained in:
Maschell 2022-02-11 22:18:56 +01:00
parent 6df6d871aa
commit 4f5ba85c39

View File

@ -39,7 +39,9 @@ WUMS_APPLICATION_REQUESTS_EXIT() {
WUMS_APPLICATION_ENDS() { WUMS_APPLICATION_ENDS() {
CallHook(gPluginInformation, WUPS_LOADER_HOOK_APPLICATION_ENDS); CallHook(gPluginInformation, WUPS_LOADER_HOOK_APPLICATION_ENDS);
if (gLinkOnReload.loadOnReload) {
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WRAPPER); CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WRAPPER);
}
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_SOCKETS); CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_SOCKETS);
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_DEVOPTAB); CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_DEVOPTAB);
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_STDCPP); CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_STDCPP);