From 0ebbc4a96b402281533403ad51808edab21a208d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 24 Jan 2013 21:10:30 +0000 Subject: another attempt to fix garbage in options git-svn-id: http://svn.miranda-ng.org/main/trunk@3269 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/options/options.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/modules') diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index b8486f7bba..0fea7c4a36 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -982,11 +982,14 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L if (wParam != IDC_TAB) { TVITEM tvi; tvi.hItem = dat->hCurrentPage = TreeView_GetSelection(hwndTree); - if (tvi.hItem != NULL) { - tvi.mask = TVIF_HANDLE | TVIF_PARAM; - TreeView_GetItem(hwndTree, &tvi); - dat->currentPage = tvi.lParam; + if (tvi.hItem == NULL) { + ShowWindow( GetDlgItem(hdlg, IDC_TAB), SW_HIDE); + break; } + + tvi.mask = TVIF_HANDLE | TVIF_PARAM; + TreeView_GetItem(hwndTree, &tvi); + dat->currentPage = tvi.lParam; ShowWindow( GetDlgItem(hdlg, IDC_TAB), SW_HIDE); } else { -- cgit v1.2.3