Fix assertion statement in wxPropertyGridManager::GetPageRoot.
Simple wxASSERT should be replaced with wxCHECK_MSG to return NULL if index is out range.
This commit is contained in:
@@ -1122,8 +1122,9 @@ bool wxPropertyGridManager::IsPropertySelected( wxPGPropArg id ) const
|
|||||||
|
|
||||||
wxPGProperty* wxPropertyGridManager::GetPageRoot( int index ) const
|
wxPGProperty* wxPropertyGridManager::GetPageRoot( int index ) const
|
||||||
{
|
{
|
||||||
wxASSERT( index >= 0 );
|
wxCHECK_MSG( (index >= 0) && (index < (int)m_arrPages.size()),
|
||||||
wxASSERT( index < (int)m_arrPages.size() );
|
NULL,
|
||||||
|
wxT("invalid page index") );
|
||||||
|
|
||||||
return m_arrPages[index]->GetStatePtr()->m_properties;
|
return m_arrPages[index]->GetStatePtr()->m_properties;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user