summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-09-22 19:34:52 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-09-22 19:34:52 +0000
commitf5a8a82ab0b5d45775c1e119a8c775c4f9a7dfac (patch)
treeb04714ed8b8d32722598934549416673e7f1ebc8 /plugins
parente79e9e44d8d960d56938f5948dc6b2d77db5b87a (diff)
tabSRMM not to crash on non-existent contacts
git-svn-id: http://svn.miranda-ng.org/main/trunk@10560 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 93fbca70d0..53ef5a3884 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -45,15 +45,16 @@ CContactCache::CContactCache(const MCONTACT hContact)
m_wOldStatus = m_wStatus = ID_STATUS_OFFLINE;
if (hContact) {
- cc = db_get_contact(hContact);
- initPhaseTwo();
- }
- else {
- cc = &ccInvalid;
- m_szAccount = C_INVALID_ACCOUNT;
- m_isMeta = false;
- m_Valid = false;
+ if ((cc = db_get_contact(hContact)) != NULL) {
+ initPhaseTwo();
+ return;
+ }
}
+
+ cc = &ccInvalid;
+ m_szAccount = C_INVALID_ACCOUNT;
+ m_isMeta = false;
+ m_Valid = false;
}
/**