summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/MraChat.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-19 09:45:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-19 09:45:39 +0000
commit4d6a4771d90af0056e15ed14c3655b19023359ca (patch)
tree4eafc6ea875f50f35bca781aee9bcdb2a1d607ed /protocols/MRA/src/MraChat.cpp
parent4c228715064267be315d0c5104c33543f0cd7ff8 (diff)
chat must be initialized inside ME_SYSTEM_MODULESLOADED
git-svn-id: http://svn.miranda-ng.org/main/trunk@7745 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/MraChat.cpp')
-rw-r--r--protocols/MRA/src/MraChat.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/MRA/src/MraChat.cpp b/protocols/MRA/src/MraChat.cpp
index ac645e11a7..27573e70eb 100644
--- a/protocols/MRA/src/MraChat.cpp
+++ b/protocols/MRA/src/MraChat.cpp
@@ -65,17 +65,15 @@ INT_PTR CMraProto::MraChatSessionNew(HANDLE hContact)
void CMraProto::MraChatSessionDestroy(HANDLE hContact)
{
- if ( !bChatExists)
+ if (!bChatExists || hContact == NULL)
return;
GCDEST gcd = { m_szModuleName, NULL, GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
CMStringW wszEMail;
- if (hContact) {
- mraGetStringW(hContact, "e-mail", wszEMail);
- gcd.ptszID = (LPWSTR)wszEMail.c_str();
- }
+ mraGetStringW(hContact, "e-mail", wszEMail);
+ gcd.ptszID = (LPWSTR)wszEMail.c_str();
CallServiceSync(MS_GC_EVENT, SESSION_TERMINATE, (LPARAM)&gce);
CallServiceSync(MS_GC_EVENT, WINDOW_CLEARLOG, (LPARAM)&gce);