summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_avatars.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/skype_avatars.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_avatars.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp
index 7622ad09e4..7fe125dab6 100644
--- a/protocols/SkypeWeb/src/skype_avatars.cpp
+++ b/protocols/SkypeWeb/src/skype_avatars.cpp
@@ -186,14 +186,12 @@ INT_PTR CSkypeProto::SvcSetMyAvatar(WPARAM, LPARAM lParam)
if (data != NULL && fread(data, sizeof(BYTE), length, hFile) == length)
{
- FI_INTERFACE *fii = NULL;
const char *szMime = "image/jpeg";
- if (CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&fii) == S_OK && fii)
- {
+ if (fii)
szMime = fii->FI_GetFIFMimeType(fii->FI_GetFIFFromFilenameU(path));
- }
PushRequest(new SetAvatarRequest(data, length, szMime, li), &CSkypeProto::OnSentAvatar);
+ fclose(hFile);
return 0;
}
}