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
This commit is contained in:
@@ -78,7 +78,10 @@ wxWindow *wxMdiXmlHandler::CreateFrame()
|
|||||||
wxMDIParentFrame *mdiParent = wxDynamicCast(m_parent, wxMDIParentFrame);
|
wxMDIParentFrame *mdiParent = wxDynamicCast(m_parent, wxMDIParentFrame);
|
||||||
|
|
||||||
if ( !mdiParent )
|
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);
|
XRC_MAKE_INSTANCE(frame, wxMDIChildFrame);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user