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:
parent
849c353a39
commit
760fdb6755
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user