diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-11-23 18:22:46 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-11-23 18:22:46 +0000 |
commit | 2d8b55b9bfd482225e5ab80ad76d8373b8677617 (patch) | |
tree | 706cd5725b72388c4112d34b3a8aba61c16e422c /protocols/Skype/src/skype_utils.cpp | |
parent | 1cdc1003e20312844ed02214301b5a6f48ea7eda (diff) |
little bit better with avatars
git-svn-id: http://svn.miranda-ng.org/main/trunk@2452 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, 6 insertions, 5 deletions
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp index 5e2573d6f5..2af0a496cf 100644 --- a/protocols/Skype/src/skype_utils.cpp +++ b/protocols/Skype/src/skype_utils.cpp @@ -264,7 +264,7 @@ int CSkypeProto::DetectAvatarFormat(const wchar_t *path) return CSkypeProto::DetectAvatarFormatBuffer(pBuf);
}
-wchar_t* CSkypeProto::GetContactAvatarFilePath(HANDLE hContact)
+wchar_t* CSkypeProto::GetContactAvatarFilePath(wchar_t *sid)
{
wchar_t* path = new wchar_t[MAX_PATH * 2];
@@ -299,10 +299,11 @@ wchar_t* CSkypeProto::GetContactAvatarFilePath(HANDLE hContact) // make sure the avatar cache directory exists
::CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)path);
- wchar_t *sid = this->GetSettingString("sid", ::mir_wstrdup(L""));
- ::wcscat(path, sid);
- ::wcscat(path, L".jpg");
- ::mir_free(sid);
+ if (sid) {
+ ::wcscat(path, sid);
+ ::wcscat(path, L".jpg");
+ } else
+ path = NULL;
return path;
}
|