# HG changeset patch # User Chris Cannam # Date 1404136963 -3600 # Node ID 24964a8b31e737aa2023981e2eeaad4122062781 # Parent 0c1d6de8f44bc158bcb55866874602bcb912e2cf Avoid crashing when trying to examine data at column < 0 in 3d model diff -r 0c1d6de8f44b -r 24964a8b31e7 data/model/EditableDenseThreeDimensionalModel.cpp --- a/data/model/EditableDenseThreeDimensionalModel.cpp Wed Jun 18 13:51:16 2014 +0100 +++ b/data/model/EditableDenseThreeDimensionalModel.cpp Mon Jun 30 15:02:43 2014 +0100 @@ -157,7 +157,7 @@ EditableDenseThreeDimensionalModel::getColumn(int index) const { QReadLocker locker(&m_lock); - if (int(index) >= m_data.size()) return Column(); + if (index < 0 || index >= m_data.size()) return Column(); return expandAndRetrieve(index); }