diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-18 23:30:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-18 23:30:48 +0000 |
commit | c6b5a9cda42f6ad6eb8ebeee0fe43257b25f7af6 (patch) | |
tree | 84a06f2864beb75e3e0995b5fff813fe85695efb /plugins/TabSRMM | |
parent | d1ad49337af4b2f89af194676902631a545ab5a2 (diff) |
fix for the total crash of everything when tabSRMM gets unloaded dynamically
git-svn-id: http://svn.miranda-ng.org/main/trunk@11519 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/contactcache.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/contactcache.h | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/trayicon.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/version.h | 2 |
4 files changed, 3 insertions, 8 deletions
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index 7ca4e06c94..1483d13b46 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -61,7 +61,7 @@ void CContactCache::initPhaseTwo() { m_szAccount = 0; if (cc->szProto) { - PROTOACCOUNT *acc = reinterpret_cast<PROTOACCOUNT *>(::CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)cc->szProto)); + PROTOACCOUNT *acc = ProtoGetAccount(cc->szProto); if (acc && acc->tszAccountName) m_szAccount = acc->tszAccountName; } @@ -75,7 +75,6 @@ void CContactCache::initPhaseTwo() updateFavorite(); } else { - cc->szProto = C_INVALID_PROTO; m_szAccount = C_INVALID_ACCOUNT; m_isMeta = false; } diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h index 300b8d7956..cc9c4d1a66 100644 --- a/plugins/TabSRMM/src/contactcache.h +++ b/plugins/TabSRMM/src/contactcache.h @@ -29,12 +29,9 @@ #ifndef __CONTACTCACHE_H
#define __CONTACTCACHE_H
-#define C_INVALID_PROTO "<proto error>"
#define C_INVALID_ACCOUNT _T("<account error>")
-#define C_INVALID_PROTO_T _T("<proto error>")
#define HISTORY_INITIAL_ALLOCSIZE 300
-
struct TInputHistory {
TCHAR* szText;
size_t lLen;
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp index 9ac0f29aa5..87fb8fa7dc 100644 --- a/plugins/TabSRMM/src/trayicon.cpp +++ b/plugins/TabSRMM/src/trayicon.cpp @@ -215,8 +215,7 @@ void TSAPI AddContactToFavorites(MCONTACT hContact, const TCHAR *szNickname, con if (hIcon == 0)
hIcon = LoadSkinnedProtoIcon(szProto, wStatus);
- PROTOACCOUNT *acc = (PROTOACCOUNT *)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)szProto);
-
+ PROTOACCOUNT *acc = ProtoGetAccount(szProto);
if (acc && acc->tszAccountName) {
mii.cbSize = sizeof(mii);
mir_sntprintf(szMenuEntry, SIZEOF(szMenuEntry), _T("%s: %s (%s)"), acc->tszAccountName, szFinalNick, szStatus);
diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h index ddd372140e..5ad50dd144 100644 --- a/plugins/TabSRMM/src/version.h +++ b/plugins/TabSRMM/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 3
#define __MINOR_VERSION 4
#define __RELEASE_NUM 0
-#define __BUILD_NUM 6
+#define __BUILD_NUM 7
#include <stdver.h>
|