user32/tests: Set last error if the menu item cannot be found.

This commit is contained in:
Paul Vriens 2008-11-07 11:45:38 +01:00 committed by Alexandre Julliard
parent adc09cc1b4
commit 80d3604947
1 changed files with 4 additions and 2 deletions

View File

@ -4423,8 +4423,10 @@ static BOOL GetMenuItemInfo_common ( HMENU hmenu, UINT item, BOOL bypos,
debug_print_menuitem("GetMenuItemInfo_common: ", menu, "");
if (!menu)
return FALSE;
if (!menu) {
SetLastError( ERROR_MENU_ITEM_NOT_FOUND);
return FALSE;
}
if( lpmii->fMask & MIIM_TYPE) {
if( lpmii->fMask & ( MIIM_STRING | MIIM_FTYPE | MIIM_BITMAP)) {