summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp10
-rw-r--r--plugins/Popup/src/popup_thread.cpp3
2 files changed, 10 insertions, 3 deletions
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index c614c702f1..350f99f536 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -1021,8 +1021,7 @@ int ProtoAck(WPARAM wParam,LPARAM lParam)
//The protocol changed from a disconnected status to a connected status.
//Enable the popups for this protocol.
int idTimer = AddAtomA(szProto);
- if (idTimer)
- {
+ if (idTimer) {
char TimerProtoName[256];
mir_snprintf(TimerProtoName, sizeof(TimerProtoName), "ConnectionTimeout%s", szProto);
UINT ConnectTimer = db_get_dw(0, MODULE, TimerProtoName, db_get_dw(0, MODULE, "ConnectionTimeout", 10000));
@@ -1132,6 +1131,12 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
return 0;
}
+static int OnShutdown(WPARAM, LPARAM)
+{
+ DestroyWindow(SecretWnd);
+ return 0;
+}
+
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfoEx);
@@ -1141,6 +1146,7 @@ extern "C" int __declspec(dllexport) Load(void)
//We create this Hook which will notify everyone when a contact changes his status.
hHookContactStatusChanged = CreateHookableEvent(ME_STATUSCHANGE_CONTACTSTATUSCHANGED);
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);
//We add the option page and the user info page (it's needed because options are loaded after plugins)
HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
//This is needed for "NoSound"-like routines.
diff --git a/plugins/Popup/src/popup_thread.cpp b/plugins/Popup/src/popup_thread.cpp
index 5c7ecfb9d0..cbba209c62 100644
--- a/plugins/Popup/src/popup_thread.cpp
+++ b/plugins/Popup/src/popup_thread.cpp
@@ -339,5 +339,6 @@ static void __cdecl PopupThread(void *arg)
DispatchMessage(&msg);
}
- ReleaseMutex(hThreadMutex);
+ DestroyWindow(gHwndManager); gHwndManager = NULL;
+ ReleaseMutex(hThreadMutex); hThreadMutex = NULL;
}