added check for index validity to OnTabButton()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3575,6 +3575,8 @@ void wxAuiNotebook::OnTabButton(wxCommandEvent& command_evt)
|
||||
else
|
||||
{
|
||||
int main_idx = m_tabs.GetIdxFromWindow(close_wnd);
|
||||
wxCHECK_RET( main_idx != wxNOT_FOUND, _T("no page to delete?") );
|
||||
|
||||
DeletePage(main_idx);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user