diff options
author | George Hazan <ghazan@miranda.im> | 2022-08-02 22:31:54 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-08-02 22:31:54 +0300 |
commit | 1a0dc87d73d7a71028ac335be0d67433f410bab1 (patch) | |
tree | 71a20e679cd0e2ed883cda5629ee1d6e667305b3 /src | |
parent | 3fd8837cf2283b9f2cc463063bb030089451be44 (diff) |
code to prevent UserInfo hooks from being destroyed
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stduserinfo/src/userinfo.cpp | 1 | ||||
-rw-r--r-- | src/mir_app/src/miranda.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index 6227348757..d1deb514b9 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -576,6 +576,7 @@ int LoadUserInfoModule(void) CreateServiceFunction("UserInfo/AddPage", AddDetailsPage);
CreateServiceFunction(MS_USERINFO_SHOWDIALOG, ShowDetailsDialogCommand);
+ // this event is already created inside the core, don't destroy it
hDetailsInitEvent = CreateHookableEvent(ME_USERINFO_INITIALISE);
HookEvent(ME_TTB_MODULELOADED, OnTopToolBarLoaded);
diff --git a/src/mir_app/src/miranda.cpp b/src/mir_app/src/miranda.cpp index 4f6e7b1beb..7628da2e66 100644 --- a/src/mir_app/src/miranda.cpp +++ b/src/mir_app/src/miranda.cpp @@ -336,5 +336,8 @@ int LoadSystemModule(void) hModulesLoadedEvent = CreateHookableEvent(ME_SYSTEM_MODULESLOADED);
hOkToExitEvent = CreateHookableEvent(ME_SYSTEM_OKTOEXIT);
hOptionsInitEvent = CreateHookableEvent(ME_OPT_INITIALISE);
+
+ // this event is created inside the core not to lose its hooks when MIID_UIUSERINFO plugin reloads
+ CreateHookableEvent(ME_USERINFO_INITIALISE);
return 0;
}
|