diff 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
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 "";
 }