diff options
Diffstat (limited to 'plugins/Toaster/src/main.cpp')
-rw-r--r-- | plugins/Toaster/src/main.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/Toaster/src/main.cpp b/plugins/Toaster/src/main.cpp index 6ce8fd69af..4f3515ffdf 100644 --- a/plugins/Toaster/src/main.cpp +++ b/plugins/Toaster/src/main.cpp @@ -39,7 +39,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
-
+ HookEvent(ME_SYSTEM_SHUTDOWN, &OnPreShutdown);
InitServices();
return 0;
@@ -49,3 +49,14 @@ extern "C" int __declspec(dllexport) Unload(void) {
return 0;
}
+
+int OnPreShutdown(WPARAM, LPARAM)
+{
+ mir_cslock lck(csNotifications);
+ for (int i = 0; i < lstNotifications.getCount(); i++)
+ lstNotifications[0].Hide();
+
+ lstNotifications.destroy();
+
+ return 0;
+}
\ No newline at end of file |