X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/73026ab9137d42bd5cc8c14f79e5edc6b7af8f70..6a64f8d41d1e85aa437cf36b20c6e44000e9bf34:/src/xrc/xh_wizrd.cpp diff --git a/src/xrc/xh_wizrd.cpp b/src/xrc/xh_wizrd.cpp index 8a758a1ad5..fd49ef89f7 100644 --- a/src/xrc/xh_wizrd.cpp +++ b/src/xrc/xh_wizrd.cpp @@ -8,10 +8,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "xh_wizrd.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -59,8 +55,7 @@ wxObject *wxWizardXmlHandler::DoCreateResource() } else { - wxWizardPage *page = NULL; - wxUnusedVar(page); + wxWizardPage *page; if (m_class == wxT("wxWizardPageSimple")) { @@ -73,13 +68,14 @@ wxObject *wxWizardXmlHandler::DoCreateResource() } else /*if (m_class == wxT("wxWizardPage"))*/ { - wxWizardPage *p = NULL; - if (m_instance) - p = wxStaticCast(m_instance, wxWizardPage); - else + if ( !m_instance ) + { wxLogError(wxT("wxWizardPage is abstract class, must be subclassed")); - p->Create(m_wizard, GetBitmap()); - page = p; + return NULL; + } + + page = wxStaticCast(m_instance, wxWizardPage); + page->Create(m_wizard, GetBitmap()); } page->SetName(GetName());