From 9fe0299dba608b50b2519d67cca92840458154f5 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Thu, 11 Aug 2016 16:40:28 +0000 Subject: VKontakte: crash fix git-svn-id: http://svn.miranda-ng.org/main/trunk@17177 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_options.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'protocols') 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); } -- cgit v1.2.3