diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-05-22 18:08:58 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-05-22 18:08:58 +0000 |
commit | 763c87a6be8344d1a3950d2ba133840c7c25c596 (patch) | |
tree | 4d25e6d23b9908c3a6ecb486782edf03f4622745 /protocols/Skype/src/skype_own_info.cpp | |
parent | 6a631da5854d7d73c89c86946e47b4d364039d63 (diff) |
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@4805 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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 5fed41ddad..302932b369 100644 --- a/protocols/Skype/src/skype_own_info.cpp +++ b/protocols/Skype/src/skype_own_info.cpp @@ -55,10 +55,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(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(key.c_str())));
+ }
}
break;
|