diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index 0e9daa0ad7..b7768fd2df 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -1155,6 +1155,7 @@ public: const wxPGCommonValue* GetCommonValue( unsigned int i ) const { + wxCHECK_MSG( i < m_commonValues.size(), NULL, "Invalid item index" ); return m_commonValues[i]; } @@ -1167,7 +1168,7 @@ public: // Returns label of given common value. wxString GetCommonValueLabel( unsigned int i ) const { - wxASSERT( GetCommonValue(i) ); + wxCHECK_MSG( i < m_commonValues.size(), wxString(), "Invalid item index" ); return GetCommonValue(i)->GetLabel(); }