From 09a78c77d065ad3a321d8469d59e1837f0e16fe4 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 24 May 2015 20:33:00 +0200 Subject: [PATCH] Fix assertion statement in wxPropertyGridManager::GetPageRoot. Simple wxASSERT should be replaced with wxCHECK_MSG to return NULL if index is out range. --- src/propgrid/manager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 1e5af7a898..18f4dbbefc 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -1122,8 +1122,9 @@ bool wxPropertyGridManager::IsPropertySelected( wxPGPropArg id ) const wxPGProperty* wxPropertyGridManager::GetPageRoot( int index ) const { - wxASSERT( index >= 0 ); - wxASSERT( index < (int)m_arrPages.size() ); + wxCHECK_MSG( (index >= 0) && (index < (int)m_arrPages.size()), + NULL, + wxT("invalid page index") ); return m_arrPages[index]->GetStatePtr()->m_properties; }