diff --git a/windows/dialog.c b/windows/dialog.c index 434644d44e3..5c3503fb0f7 100644 --- a/windows/dialog.c +++ b/windows/dialog.c @@ -1476,7 +1476,7 @@ static HWND DIALOG_GetNextTabItem( HWND hwndMain, HWND hwndDlg, HWND hwndCtrl, B if(!retWnd) retWnd = DIALOG_GetNextTabItem(hwndMain,hwndMain,NULL,fPrevious ); } - return retWnd; + return retWnd ? retWnd : hwndCtrl; } /***********************************************************************