More restrictive checks, so DIALOG_IsAccelerator don't loop

endlessly.
This commit is contained in:
Marcus Meissner 1999-09-03 16:39:36 +00:00 committed by Alexandre Julliard
parent 2eb0a302a0
commit 6f7797bc77
1 changed files with 2 additions and 2 deletions

View File

@ -1183,7 +1183,7 @@ static BOOL DIALOG_IsAccelerator( HWND hwnd, HWND hwndDlg, WPARAM vKey )
{
hwndNext = GetWindow( hwndControl, GW_HWNDNEXT );
}
while (!hwndNext)
while (!hwndNext && hwndControl)
{
hwndControl = GetParent( hwndControl );
if (hwndControl == hwndDlg)
@ -1201,7 +1201,7 @@ static BOOL DIALOG_IsAccelerator( HWND hwnd, HWND hwndDlg, WPARAM vKey )
}
hwndControl = hwndNext;
}
while (hwndControl != hwnd);
while (hwndControl && (hwndControl != hwnd));
}
return RetVal;
}