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

Alexandre Julliard julliard at winehq.org
Fri Nov 7 07:24:08 CST 2008


Module: wine
Branch: master
Commit: 80d3604947f6aaeba5ed437753d8a59cffc0d5f8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=80d3604947f6aaeba5ed437753d8a59cffc0d5f8

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Fri Nov  7 11:45:38 2008 +0100

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

---

 dlls/user32/menu.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index 928a9eb..ed93eff 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -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)) {




More information about the wine-cvs mailing list