diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2013-04-13 19:59:11 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2013-04-13 19:59:11 +0000 |
commit | 51b5164fd6c0ea0de58e4398e515dd73a0e12620 (patch) | |
tree | 94bed44c33f9c186f0110feadb56c1403ddf59cd /protocols/Skype/src/skype_utils.cpp | |
parent | 241aed20d47fe5e443370cd6224b5b2e844348d3 (diff) |
- fix some own avatar get/set bugs
git-svn-id: http://svn.miranda-ng.org/main/trunk@4449 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_utils.cpp')
-rw-r--r-- | protocols/Skype/src/skype_utils.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp index 03ddc08302..acc1ef33c5 100644 --- a/protocols/Skype/src/skype_utils.cpp +++ b/protocols/Skype/src/skype_utils.cpp @@ -344,7 +344,7 @@ wchar_t* CSkypeProto::GetContactAvatarFilePath(HANDLE hContact) {
wchar_t *tmpPath = ::Utils_ReplaceVarsT(L"%miranda_avatarcache%");
::mir_sntprintf(path, MAX_PATH, _T("%s\\%S"), tmpPath, this->m_szModuleName);
- mir_free(tmpPath);
+ ::mir_free(tmpPath);
}
DWORD dwAttributes = GetFileAttributes(path);
@@ -356,6 +356,11 @@ wchar_t* CSkypeProto::GetContactAvatarFilePath(HANDLE hContact) ::mir_sntprintf(path, MAX_PATH, _T("%s\\%s.jpg"), path, sid);
else if (sid != NULL)
::mir_sntprintf(path, MAX_PATH, _T("%s\\%s avatar.jpg"), path, sid);
+ else
+ {
+ delete path;
+ return NULL;
+ }
return path;
}
@@ -365,7 +370,7 @@ int CSkypeProto::CompareProtos(const CSkypeProto *p1, const CSkypeProto *p2) return wcscmp(p1->m_tszUserName, p2->m_tszUserName);
}
-void CSkypeProto::CreateService(const char* szService, SkypeServiceFunc serviceProc)
+void CSkypeProto::CreateServiceObj(const char* szService, SkypeServiceFunc serviceProc)
{
char moduleName[MAXMODULELABELLENGTH];
@@ -373,7 +378,7 @@ void CSkypeProto::CreateService(const char* szService, SkypeServiceFunc serviceP ::CreateServiceFunctionObj(moduleName, (MIRANDASERVICEOBJ)*(void**)&serviceProc, this);
}
-void CSkypeProto::CreateServiceParam(const char* szService, SkypeServiceFunc serviceProc, LPARAM lParam)
+void CSkypeProto::CreateServiceObjParam(const char* szService, SkypeServiceFunc serviceProc, LPARAM lParam)
{
char moduleName[MAXMODULELABELLENGTH];
|