]> git.saurik.com Git - wxWidgets.git/commitdiff
make it clear that m_page is not NULL in OnBackOrNext() (coverity checked CID 20)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Mar 2006 23:24:55 +0000 (23:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Mar 2006 23:24:55 +0000 (23:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/wizard.cpp

index 7054c967076444c34955ca54b1d6d13e069bdc07..4690af5eae481185ba1c66dadfd2a2137a373617 100644 (file)
@@ -780,10 +780,12 @@ void wxWizard::OnBackOrNext(wxCommandEvent& event)
                   (event.GetEventObject() == m_btnPrev),
                   wxT("unknown button") );
 
+    wxCHECK_RET( m_page, _T("should have a valid current page") );
+
     // ask the current page first: notice that we do it before calling
     // GetNext/Prev() because the data transfered from the controls of the page
     // may change the value returned by these methods
-    if ( m_page && (!m_page->Validate() || !m_page->TransferDataFromWindow()) )
+    if ( !m_page->Validate() || !m_page->TransferDataFromWindow() )
     {
         // the page data is incorrect, don't do anything
         return;