X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..606b005fb2b535b34d1ca45d2d06ee86718e8b1c:/src/msw/frame.cpp diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 8b0ff3270d..6ff16e1ff8 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -507,7 +507,8 @@ void wxFrameMSW::SetMenuBar(wxMenuBar *menubar) } else { - menubar->Detach(); + if (menubar->IsAttached()) + menubar->Detach(); m_hMenu = menubar->Create();