summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp2
-rw-r--r--src/core/stduserinfo/src/userinfo.cpp1
-rw-r--r--src/mir_app/src/miranda.cpp3
3 files changed, 5 insertions, 1 deletions
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index c93136e8fb..d541b37281 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -1337,6 +1337,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
void DlgContactInfoLoadModule()
{
+ // this event is already created inside the core, don't destroy it
g_hDetailsInitEvent = CreateHookableEvent(ME_USERINFO_INITIALISE);
CreateServiceFunction(MS_USERINFO_SHOWDIALOG, ShowDialog);
@@ -1358,5 +1359,4 @@ void DlgContactInfoLoadModule()
void DlgContactInfoUnLoadModule()
{
WindowList_Destroy(g_hWindowList);
- DestroyHookableEvent(g_hDetailsInitEvent);
}
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;
}