Mercurial > hg > svcore
diff data/model/EditableDenseThreeDimensionalModel.cpp @ 937:24964a8b31e7
Avoid crashing when trying to examine data at column < 0 in 3d model
author | Chris Cannam |
---|---|
date | Mon, 30 Jun 2014 15:02:43 +0100 |
parents | df82da55e86a |
children | 5bd05a24e32a |
line wrap: on
line diff
--- 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); }