fixed crash in case of not subclasses wxWizardPage in the resources (coverity checker CID 18)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -55,8 +55,7 @@ wxObject *wxWizardXmlHandler::DoCreateResource()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxWizardPage *page = NULL;
|
wxWizardPage *page;
|
||||||
wxUnusedVar(page);
|
|
||||||
|
|
||||||
if (m_class == wxT("wxWizardPageSimple"))
|
if (m_class == wxT("wxWizardPageSimple"))
|
||||||
{
|
{
|
||||||
@@ -69,13 +68,14 @@ wxObject *wxWizardXmlHandler::DoCreateResource()
|
|||||||
}
|
}
|
||||||
else /*if (m_class == wxT("wxWizardPage"))*/
|
else /*if (m_class == wxT("wxWizardPage"))*/
|
||||||
{
|
{
|
||||||
wxWizardPage *p = NULL;
|
if ( !m_instance )
|
||||||
if (m_instance)
|
{
|
||||||
p = wxStaticCast(m_instance, wxWizardPage);
|
|
||||||
else
|
|
||||||
wxLogError(wxT("wxWizardPage is abstract class, must be subclassed"));
|
wxLogError(wxT("wxWizardPage is abstract class, must be subclassed"));
|
||||||
p->Create(m_wizard, GetBitmap());
|
return NULL;
|
||||||
page = p;
|
}
|
||||||
|
|
||||||
|
page = wxStaticCast(m_instance, wxWizardPage);
|
||||||
|
page->Create(m_wizard, GetBitmap());
|
||||||
}
|
}
|
||||||
|
|
||||||
page->SetName(GetName());
|
page->SetName(GetName());
|
||||||
|
Reference in New Issue
Block a user