diff options
-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 {
|