X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..fbd11d30c8499ef25989974ef6ec16fb5b759668:/src/common/menucmn.cpp diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 8ab7f2b95f..45ad387456 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -385,6 +385,8 @@ wxMenuItem *wxMenuBase::DoRemove(wxMenuItem *item) if ( submenu ) { submenu->SetParent((wxMenu *)NULL); + if ( submenu->IsAttached() ) + submenu->Detach(); } return item;