summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-02 18:40:03 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-02 18:40:03 +0000
commit3a0bfdecae261d7a33c2114ec47dda0eaafe6572 (patch)
treef777073206ee557b23141b1be090e49eb5cc7eb8 /plugins/TabSRMM/src
parent8619c5f888ad902c48b6fc8be904e764112ca361 (diff)
fix for very rare crash on exit
git-svn-id: http://svn.miranda-ng.org/main/trunk@2156 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/chat/clist.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/TabSRMM/src/chat/clist.cpp b/plugins/TabSRMM/src/chat/clist.cpp
index 5abfc4b384..dbcbb27ee8 100644
--- a/plugins/TabSRMM/src/chat/clist.cpp
+++ b/plugins/TabSRMM/src/chat/clist.cpp
@@ -106,6 +106,9 @@ BOOL CList_SetOffline(HANDLE hContact, BOOL bHide)
{
if (hContact) {
char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ if (szProto == NULL)
+ return FALSE;
+
int i = M->GetByte(hContact, szProto, "ChatRoom", 0);
DBWriteContactSettingWord(hContact, szProto, "ApparentMode", (LPARAM) 0);
DBWriteContactSettingWord(hContact, szProto, "Status", ID_STATUS_OFFLINE);