Mercurial > hg > svcore
comparison data/model/EditableDenseThreeDimensionalModel.cpp @ 939:5bd05a24e32a
Avoid trying to return out-of-range bin name
author | Chris Cannam |
---|---|
date | Tue, 01 Jul 2014 15:31:25 +0100 |
parents | 24964a8b31e7 |
children | 0009b2b066e0 |
comparison
equal
deleted
inserted
replaced
938:90e9a3f873cf | 939:5bd05a24e32a |
---|---|
388 } | 388 } |
389 | 389 |
390 QString | 390 QString |
391 EditableDenseThreeDimensionalModel::getBinName(int n) const | 391 EditableDenseThreeDimensionalModel::getBinName(int n) const |
392 { | 392 { |
393 if ((int)m_binNames.size() > n) return m_binNames[n]; | 393 if (n >= 0 && (int)m_binNames.size() > n) return m_binNames[n]; |
394 else return ""; | 394 else return ""; |
395 } | 395 } |
396 | 396 |
397 void | 397 void |
398 EditableDenseThreeDimensionalModel::setBinName(int n, QString name) | 398 EditableDenseThreeDimensionalModel::setBinName(int n, QString name) |