diff options
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;
}
|