From c6b5a9cda42f6ad6eb8ebeee0fe43257b25f7af6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 18 Dec 2014 23:30:48 +0000 Subject: 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 --- plugins/TabSRMM/src/contactcache.cpp | 3 +-- plugins/TabSRMM/src/contactcache.h | 3 --- plugins/TabSRMM/src/trayicon.cpp | 3 +-- plugins/TabSRMM/src/version.h | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) (limited to 'plugins/TabSRMM/src') 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(::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 "" #define C_INVALID_ACCOUNT _T("") -#define C_INVALID_PROTO_T _T("") #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 -- cgit v1.2.3