summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_own_info.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-05-10 10:47:35 +0000
committerRobert Pösel <robyer@seznam.cz>2013-05-10 10:47:35 +0000
commit729ba893c3ede0053be2c15fa54c9f9d828dbe0b (patch)
tree8f8b759d4b93cafc7efad0a0f9e6103f456f2daf /protocols/Skype/src/skype_own_info.cpp
parent443225723338ab61362ae37f7058c3f643febdf5 (diff)
Skype:
- Fixed showing own birthdate with day=1 or month=1 - Fixed crash when no own language set git-svn-id: http://svn.miranda-ng.org/main/trunk@4619 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_own_info.cpp')
-rw-r--r--protocols/Skype/src/skype_own_info.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/protocols/Skype/src/skype_own_info.cpp b/protocols/Skype/src/skype_own_info.cpp
index 47e58b524a..4a3b5415fc 100644
--- a/protocols/Skype/src/skype_own_info.cpp
+++ b/protocols/Skype/src/skype_own_info.cpp
@@ -49,10 +49,12 @@ void CSkypeProto::SaveOwnInfoToServer(HWND hwndPage, int iPage)
this->account->SetIntProperty(Account::P_BIRTHDAY, value);
int lang = ::SendMessage(GetDlgItem(hwndPage, IDC_LANGUAGE), CB_GETCURSEL, 0, 0);
- std::wstring key = *(std::wstring *)SendMessage(GetDlgItem(hwndPage, IDC_LANGUAGE), CB_GETITEMDATA, lang, 0);
- this->account->SetStrProperty(
- Account::P_LANGUAGES,
- (char*)mir_ptr<char>(::mir_utf8encodeW(CSkypeProto::languages[key].c_str())));
+ if (lang != -1) {
+ std::wstring key = *(std::wstring *)SendMessage(GetDlgItem(hwndPage, IDC_LANGUAGE), CB_GETITEMDATA, lang, 0);
+ this->account->SetStrProperty(
+ Account::P_LANGUAGES,
+ (char*)mir_ptr<char>(::mir_utf8encodeW(CSkypeProto::languages[key].c_str())));
+ }
}
break;