[User32]
[reactos.git] / reactos / win32ss / user / user32 / windows / menu.c
index 0311153..8241379 100644 (file)
@@ -295,12 +295,12 @@ static BOOL GetMenuItemInfo_common ( HMENU hmenu,
          {                                         // Very strange this fixes a wine test with a crash.
                 if(lpmii->dwTypeData && lpmii->cch && !(GdiValidateHandle((HGDIOBJ)lpmii->dwTypeData)) )
                 {
-                    lpmii->cch = 0;
                     if( unicode)
                         *((WCHAR *)lpmii->dwTypeData) = 0;
                     else
                         *((CHAR *)lpmii->dwTypeData) = 0;
                 }
+                lpmii->cch = 0;
          }
          else
          {