changeset 939:5bd05a24e32a

Avoid trying to return out-of-range bin name
author Chris Cannam
date Tue, 01 Jul 2014 15:31:25 +0100
parents 90e9a3f873cf
children 0009b2b066e0
files data/model/EditableDenseThreeDimensionalModel.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/data/model/EditableDenseThreeDimensionalModel.cpp	Tue Jul 01 11:39:09 2014 +0100
+++ b/data/model/EditableDenseThreeDimensionalModel.cpp	Tue Jul 01 15:31:25 2014 +0100
@@ -390,7 +390,7 @@
 QString
 EditableDenseThreeDimensionalModel::getBinName(int n) const
 {
-    if ((int)m_binNames.size() > n) return m_binNames[n];
+    if (n >= 0 && (int)m_binNames.size() > n) return m_binNames[n];
     else return "";
 }