summaryrefslogtreecommitdiff
path: root/src/core/stduihist/history.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/stduihist/history.cpp')
-rw-r--r--src/core/stduihist/history.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/stduihist/history.cpp b/src/core/stduihist/history.cpp
index 0152d177bf..55795e62bc 100644
--- a/src/core/stduihist/history.cpp
+++ b/src/core/stduihist/history.cpp
@@ -398,8 +398,10 @@ static int HistoryContactDelete(WPARAM wParam, LPARAM)
int PreShutdownHistoryModule(WPARAM, LPARAM)
{
- if (hWindowList)
- WindowList_BroadcastAsync(hWindowList, WM_DESTROY, 0, 0);
+ if (hWindowList) {
+ WindowList_Broadcast(hWindowList, WM_DESTROY, 0, 0);
+ WindowList_Destroy(hWindowList);
+ }
return 0;
}
@@ -413,7 +415,7 @@ int LoadHistoryModule(void)
Menu_AddContactMenuItem(&mi);
CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY, UserHistoryCommand);
- hWindowList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
+ hWindowList = WindowList_Create();
HookEvent(ME_DB_CONTACT_DELETED, HistoryContactDelete);
HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdownHistoryModule);
return 0;