don't pass potentially negative index to SetSelection()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3070,7 +3070,15 @@ void wxAuiNotebook::Split(size_t page, int direction)
|
||||
m_curpage = -1;
|
||||
|
||||
// set the active page to the one we just split off
|
||||
SetSelection(m_tabs.GetIdxFromWindow(page_info.window));
|
||||
int idx = m_tabs.GetIdxFromWindow(page_info.window);
|
||||
if ( idx != wxNOT_FOUND )
|
||||
{
|
||||
SetSelection(idx);
|
||||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( _T("just inserted window not found") );
|
||||
}
|
||||
|
||||
UpdateHintWindowSize();
|
||||
}
|
||||
|
Reference in New Issue
Block a user