# HG changeset patch # User Chris Cannam # Date 1297113249 0 # Node ID ad7c966208869e818a37bb0460c1b02d072a5e59 # Parent 1c8898816fd0824ef3edf083cca3cfbdfe6c27b3 * Fix crash when importing CSV file with varying number of columns per row diff -r 1c8898816fd0 -r ad7c96620886 data/fileio/CSVFormat.cpp --- a/data/fileio/CSVFormat.cpp Thu Feb 03 13:15:07 2011 +0000 +++ b/data/fileio/CSVFormat.cpp Mon Feb 07 21:14:09 2011 +0000 @@ -309,6 +309,9 @@ CSVFormat::ColumnPurpose CSVFormat::getColumnPurpose(int i) const { + if (m_columnPurposes.size() <= i) { + return ColumnUnknown; + } return m_columnPurposes[i]; }