summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-08-30 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-08-30 10:31:04 +0000
commitb0b0895234ee50dba6558822ffb7a1577f240e4e (patch)
tree1250bd2750245dae66fc2cc5a00bdf598e2c8f6a /protocols
parentab4ac1ba8910c3974b4cfb2af3434e5263cdc8bd (diff)
stupid bug with calling FreeLibrary several times
git-svn-id: http://svn.miranda-ng.org/main/trunk@17216 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/JabberG/src/jabber.cpp7
-rw-r--r--protocols/JabberG/src/jabber_console.cpp3
2 files changed, 7 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp
index 18008f7313..043f709274 100644
--- a/protocols/JabberG/src/jabber.cpp
+++ b/protocols/JabberG/src/jabber.cpp
@@ -36,6 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma comment(lib, "Secur32.lib")
HINSTANCE hInst;
+HMODULE hMsftedit;
int hLangpack;
unsigned int g_nTempFileId;
@@ -199,6 +200,8 @@ extern "C" int __declspec(dllexport) Load()
CallService(MS_UTILS_GETCOUNTRYLIST, (WPARAM)&g_cbCountries, (LPARAM)&g_countries);
+ hMsftedit = LoadLibrary(L"Msftedit.dll");
+
hExtListInit = CreateHookableEvent(ME_JABBER_EXTLISTINIT);
hDiscoInfoResult = CreateHookableEvent(ME_JABBER_SRVDISCOINFO);
@@ -213,6 +216,7 @@ extern "C" int __declspec(dllexport) Load()
g_IconsInit();
g_XstatusIconsInit();
+
// Init extra icons
hExtraActivity = ExtraIcon_RegisterIcolib("activity", LPGEN("Jabber Activity"), "jabber_dancing");
hExtraMood = ExtraIcon_RegisterIcolib("mood", LPGEN("Jabber Mood"), "jabber_contemplative");
@@ -229,6 +233,9 @@ extern "C" int __declspec(dllexport) Unload(void)
{
JabberUserInfoUninit();
+ if (hMsftedit != NULL)
+ FreeLibrary(hMsftedit);
+
DestroyHookableEvent(hExtListInit);
DestroyHookableEvent(hDiscoInfoResult);
diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp
index 1a330e2ae7..a6a40c34b4 100644
--- a/protocols/JabberG/src/jabber_console.cpp
+++ b/protocols/JabberG/src/jabber_console.cpp
@@ -612,10 +612,8 @@ void __cdecl CJabberProto::ConsoleThread(void*)
m_dwConsoleThreadId = 0;
}
-HMODULE hMsftedit;
void CJabberProto::ConsoleInit()
{
- hMsftedit = LoadLibrary(L"Msftedit.dll");
m_hThreadConsole = ForkThreadEx(&CJabberProto::ConsoleThread, 0, &m_dwConsoleThreadId);
}
@@ -632,7 +630,6 @@ void CJabberProto::ConsoleUninit()
m_filterInfo.iq = m_filterInfo.msg = m_filterInfo.presence = FALSE;
m_filterInfo.type = TFilterInfo::T_OFF;
- FreeLibrary(hMsftedit);
}
INT_PTR __cdecl CJabberProto::OnMenuHandleConsole(WPARAM, LPARAM)