From: Vadim Zeitlin Date: Wed, 8 Mar 2006 00:03:15 +0000 (+0000) Subject: don't crash in case of incorrectly specified parent type of MDI child frame (coverity... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1e5deeb2f17f90a09c0ba881e91db6ee2bad87e0?ds=inline don't crash in case of incorrectly specified parent type of MDI child frame (coverity checker CID 16) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/xrc/xh_mdi.cpp b/src/xrc/xh_mdi.cpp index 5838d7c288..507f49d806 100644 --- a/src/xrc/xh_mdi.cpp +++ b/src/xrc/xh_mdi.cpp @@ -78,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);