- Don't try to get the length of a possibly empty string. This fixes many menu appli...
authorAlex Ionescu <aionescu@gmail.com>
Tue, 26 Jul 2005 00:43:19 +0000 (00:43 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Tue, 26 Jul 2005 00:43:19 +0000 (00:43 +0000)
svn path=/trunk/; revision=16728

reactos/lib/user32/windows/menu.c

index 56ad7a0..7afb063 100644 (file)
@@ -3771,8 +3771,11 @@ GetMenuItemInfoA(
    }
 
    RtlCopyMemory(mii, &miiW, miiW.cbSize);
-   mii->dwTypeData = AnsiBuffer;
-   mii->cch = strlen(AnsiBuffer);
+   if (AnsiBuffer)
+   {
+        mii->dwTypeData = AnsiBuffer;
+        mii->cch = strlen(AnsiBuffer);
+   }
    return TRUE;
 }