Fix for [ 688754 ] wxNotebook::SetSelection(-1) will segfault
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -373,7 +373,7 @@ int wxNotebook::SetSelection( int page )
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid notebook") );
|
||||
|
||||
wxCHECK_MSG( page < (int)m_pagesData.GetCount(), -1, wxT("invalid notebook index") );
|
||||
wxCHECK_MSG( page >= 0 && page < (int)m_pagesData.GetCount(), -1, wxT("invalid notebook index") );
|
||||
|
||||
int selOld = GetSelection();
|
||||
|
||||
|
Reference in New Issue
Block a user