From 10ff14524b9c965e7e5c89991a730c84ed62dce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 11 Feb 2010 12:48:29 +0000 Subject: [PATCH] Make it possible to subclass wxMenuBar in XRC (patch #11679). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/xrc/xh_menu.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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