diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-24 14:19:23 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-24 14:19:23 +0000 |
commit | 5f3e3abd23f5ec503976885a073aae2c2a276ade (patch) | |
tree | dc4d38b0fd2accd1edf333646b9dcd084efce67c /plugins/Popup/src/main.cpp | |
parent | 5f5679475c4817314d5211e7f9714de0fea3efe3 (diff) |
- fix for thread control in Popup+;
- fix for a very specific crash on exit in MTextControl;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@11048 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src/main.cpp')
-rw-r--r-- | plugins/Popup/src/main.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index 3f97bf29f9..19a01e7224 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -319,7 +319,6 @@ MIRAPI PLUGININFOEX* MirandaPluginInfoEx(DWORD) return &pluginInfoEx;
}
-//ME_SYSTEM_PRESHUTDOWN event
//called before the app goes into shutdown routine to make sure everyone is happy to exit
static int OkToExit(WPARAM, LPARAM)
{
@@ -328,6 +327,13 @@ static int OkToExit(WPARAM, LPARAM) return 0;
}
+static int OnShutdown(WPARAM, LPARAM)
+{
+ UnloadPopupThread();
+ UnloadPopupWnd2();
+ return 0;
+}
+
//===== Load =====
//Initializes the services provided and the link to those needed
//Called when the plugin is loaded into Miranda
@@ -367,6 +373,7 @@ MIRAPI int Load(void) HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
HookEvent(ME_SYSTEM_PRESHUTDOWN, OkToExit);
+ HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
hbmNoAvatar = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_NOAVATAR));
@@ -437,8 +444,6 @@ MIRAPI int Unload(void) mir_free(PopupOptions.Effect);
OptAdv_UnregisterVfx();
- UnloadPopupThread();
- UnloadPopupWnd2();
PopupHistoryUnload();
SrmmMenu_Unload();
|