diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 9043cf3fd47f..d2d253ca2dc6 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -2209,6 +2209,7 @@ wxString wxDataViewListStore::GetColumnType( unsigned int pos ) const void wxDataViewListStore::AppendItem( const wxVector &values, wxUIntPtr data ) { + wxCHECK_RET( values.size() == GetColumnCount(), "wrong number of values" ); wxDataViewListStoreLine *line = new wxDataViewListStoreLine( data ); line->m_values = values; m_data.push_back( line ); @@ -2218,6 +2219,7 @@ void wxDataViewListStore::AppendItem( const wxVector &values, wxUIntP void wxDataViewListStore::PrependItem( const wxVector &values, wxUIntPtr data ) { + wxCHECK_RET( values.size() == GetColumnCount(), "wrong number of values" ); wxDataViewListStoreLine *line = new wxDataViewListStoreLine( data ); line->m_values = values; m_data.insert( m_data.begin(), line ); @@ -2228,6 +2230,7 @@ void wxDataViewListStore::PrependItem( const wxVector &values, wxUInt void wxDataViewListStore::InsertItem( unsigned int row, const wxVector &values, wxUIntPtr data ) { + wxCHECK_RET( values.size() == GetColumnCount(), "wrong number of values" ); wxDataViewListStoreLine *line = new wxDataViewListStoreLine( data ); line->m_values = values; m_data.insert( m_data.begin()+row, line );