X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dbdf9a176f4239d8204cef176fd9780530ba9302..93bfd481b7f2f0fec50dd79fcab52374aa59ebbb:/src/common/menucmn.cpp?ds=sidebyside diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index b272d1483d..45ad387456 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -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;