X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/819559b2ac7d2250097ce0b1d9d443164752be09..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/xrc/xh_menu.cpp diff --git a/src/xrc/xh_menu.cpp b/src/xrc/xh_menu.cpp index f6cc1963f1..275c78aa62 100644 --- a/src/xrc/xh_menu.cpp +++ b/src/xrc/xh_menu.cpp @@ -148,7 +148,17 @@ wxMenuBarXmlHandler::wxMenuBarXmlHandler() : wxXmlResourceHandler() wxObject *wxMenuBarXmlHandler::DoCreateResource() { - wxMenuBar *menubar = new wxMenuBar(GetStyle()); + wxMenuBar *menubar = NULL; + + const int style = GetStyle(); + wxASSERT_MSG(!style || !m_instance, + "cannot use