]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/menucmn.cpp
fixes for harmless mingw32 warnings
[wxWidgets.git] / src / common / menucmn.cpp
index b272d1483d48b7c3eef1bf35785e176375520187..45ad387456d163e61e54b5d37684dc4738179c97 100644 (file)
@@ -5,7 +5,7 @@
 // Modified by:
 // Created:     26.10.99
 // RCS-ID:      $Id$
-// Copyright:   (c) wxWindows team
+// Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -385,6 +385,8 @@ wxMenuItem *wxMenuBase::DoRemove(wxMenuItem *item)
     if ( submenu )
     {
         submenu->SetParent((wxMenu *)NULL);
+        if ( submenu->IsAttached() )
+            submenu->Detach();
     }
 
     return item;