diff options
author | George Hazan <george.hazan@gmail.com> | 2013-01-24 21:10:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-01-24 21:10:30 +0000 |
commit | 0ebbc4a96b402281533403ad51808edab21a208d (patch) | |
tree | 52bead19cc677a06442e56e736ac9a7a6eb2477a | |
parent | 3dd55ec5dc6c8d4166b59a8334ec47fd5671874e (diff) |
another attempt to fix garbage in options
git-svn-id: http://svn.miranda-ng.org/main/trunk@3269 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | src/modules/options/options.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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 {
|