]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mdi.cpp
reset virtual root to NULL in DeleteAllItems()
[wxWidgets.git] / src / msw / mdi.cpp
index 41e02c6b1be7917f66ae86cc48aa3c844367d17e..1afd35dd6c1ecac0c47fd1fcbbc0c7d548dfb6c4 100644 (file)
@@ -1352,7 +1352,12 @@ static void RemoveWindowMenu(wxWindow *win, WXHMENU menu)
         {
             if ( !::GetMenuString(hMenu, i, buf, WXSIZEOF(buf), MF_BYPOSITION) )
             {
-                wxLogLastError(wxT("GetMenuString"));
+                // Ignore successful read of menu string with length 0 which
+                // occurs, for example, for a maximized MDI childs system menu
+                if ( ::GetLastError() != 0 )
+                {
+                    wxLogLastError(wxT("GetMenuString"));
+                }
 
                 continue;
             }