diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-08-11 16:40:28 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-08-11 16:40:28 +0000 |
commit | 9fe0299dba608b50b2519d67cca92840458154f5 (patch) | |
tree | 5e4e60112dfada233544b76827ca99747598f116 | |
parent | 3ab53b37c6e80b2b768617848f4e01e7163bc494 (diff) |
VKontakte: crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@17177 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/VKontakte/src/vk_options.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index de336d3f9c..0f6d9067c1 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -168,23 +168,29 @@ void CVkOptionAccountForm::OnInitDialog() m_pwszOldGroup = m_edtGroupName.GetText();
+ int iListIndex = 0;
for (size_t i = 0; i < _countof(vkMarkMsgAsReadMethods); i++) {
int cur = m_cbxMarkAsRead.AddString(vkMarkMsgAsReadMethods[i].type, vkMarkMsgAsReadMethods[i].data);
if (vkMarkMsgAsReadMethods[i].data == m_proto->m_vkOptions.iMarkMessageReadOn)
- m_cbxMarkAsRead.SetCurSel(cur);
+ iListIndex = cur;
}
+ m_cbxMarkAsRead.SetCurSel(iListIndex);
+ iListIndex = 0;
for (size_t i = 0; i < _countof(vkHistorySyncMethods); i++) {
int cur = m_cbxSyncHistory.AddString(vkHistorySyncMethods[i].type, vkHistorySyncMethods[i].data);
if (vkHistorySyncMethods[i].data == m_proto->m_vkOptions.iSyncHistoryMetod)
- m_cbxSyncHistory.SetCurSel(cur);
+ iListIndex = cur;
}
+ m_cbxSyncHistory.SetCurSel(iListIndex);
+ iListIndex = 0;
for (size_t i = 0; i < _countof(vkLangCodes); i++) {
int cur = m_cbxVKLang.AddString(TranslateW(vkLangCodes[i].szDescription), (LPARAM)vkLangCodes[i].szCode);
if (!mir_wstrcmpi(vkLangCodes[i].szCode, m_proto->m_vkOptions.pwszVKLang))
- m_cbxVKLang.SetCurSel(cur);
+ iListIndex = cur;
}
+ m_cbxVKLang.SetCurSel(iListIndex);
}
|