X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f9bf0c6512684a9a4d4d4eb59ff39817a4fda77b..443e2f09a5f5295bfbb25459956d806ecc5c2e7f:/src/xrc/xh_mdi.cpp diff --git a/src/xrc/xh_mdi.cpp b/src/xrc/xh_mdi.cpp index 980367b19d..507f49d806 100644 --- a/src/xrc/xh_mdi.cpp +++ b/src/xrc/xh_mdi.cpp @@ -8,10 +8,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "xh_mdi.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -82,7 +78,10 @@ wxWindow *wxMdiXmlHandler::CreateFrame() wxMDIParentFrame *mdiParent = wxDynamicCast(m_parent, wxMDIParentFrame); if ( !mdiParent ) - wxLogError(wxT("Parent is not of type wxMDIParentFrame.")); + { + wxLogError(wxT("Parent of wxMDIParentFrame must be wxMDIParentFrame.")); + return NULL; + } XRC_MAKE_INSTANCE(frame, wxMDIChildFrame); @@ -107,7 +106,7 @@ wxObject *wxMdiXmlHandler::DoCreateResource() frame->Move(GetPosition()); if (HasParam(wxT("icon"))) { - wxFrame* f = wxDynamicCast(f, wxFrame); + wxFrame* f = wxDynamicCast(frame, wxFrame); if (f) f->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON)); }