- Don't try to get the length of a possibly empty string. This fixes many menu applications (such as WinRAR). However I'm now getting a bug due to a double-free. It seems a GDI Object is being freed twice. Can anyone check this out please?
Modified: trunk/reactos/lib/user32/windows/menu.c

Modified: trunk/reactos/lib/user32/windows/menu.c
--- trunk/reactos/lib/user32/windows/menu.c	2005-07-25 23:19:12 UTC (rev 16727)
+++ trunk/reactos/lib/user32/windows/menu.c	2005-07-26 00:43:19 UTC (rev 16728)
@@ -3771,8 +3771,11 @@
    }
 
    RtlCopyMemory(mii, &miiW, miiW.cbSize);
-   mii->dwTypeData = AnsiBuffer;
-   mii->cch = strlen(AnsiBuffer);
+   if (AnsiBuffer)
+   {
+        mii->dwTypeData = AnsiBuffer;
+        mii->cch = strlen(AnsiBuffer);
+   }
    return TRUE;
 }