X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1582a1db62cf60d2a9b74b31e6778d46245a0f74..5c413e62cfe6d551d5297fca88721bc8897bb671:/src/xrc/xh_toolb.cpp?ds=sidebyside diff --git a/src/xrc/xh_toolb.cpp b/src/xrc/xh_toolb.cpp index c6e75a3615..2d262ee902 100644 --- a/src/xrc/xh_toolb.cpp +++ b/src/xrc/xh_toolb.cpp @@ -239,8 +239,6 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() m_isInside = false; m_toolbar = NULL; - toolbar->Realize(); - if (m_parentAsWindow && !GetBool(wxT("dontattachtoframe"))) { wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame); @@ -248,6 +246,8 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() parentFrame->SetToolBar(toolbar); } + toolbar->Realize(); + return toolbar; } }