diff options
Diffstat (limited to 'protocols/Skype/src/skype_own_info.cpp')
-rw-r--r-- | protocols/Skype/src/skype_own_info.cpp | 10 |
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;
|