]> git.saurik.com Git - wxWidgets.git/commitdiff
added check for index validity to OnTabButton()
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 30 Mar 2007 16:49:42 +0000 (16:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 30 Mar 2007 16:49:42 +0000 (16:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/auibook.cpp

index dc73becd50f7cf5464e5cd993edb18a54008592b..a30edc27f8b6b7ce87e3520f848c2e0dbb63e4ba 100644 (file)
@@ -3572,9 +3572,11 @@ void wxAuiNotebook::OnTabButton(wxCommandEvent& command_evt)
             {
                 close_wnd->Close();
             }
-             else
+            else
             {
                 int main_idx = m_tabs.GetIdxFromWindow(close_wnd);
+                wxCHECK_RET( main_idx != wxNOT_FOUND, _T("no page to delete?") );
+
                 DeletePage(main_idx);
             }
         }