Commit 6f7797bc authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

More restrictive checks, so DIALOG_IsAccelerator don't loop

endlessly.
parent 2eb0a302
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment