diff NoteHypothesis.cpp @ 34:3fb9c657d86b

Expand hypothesis tests
author Chris Cannam
date Fri, 13 Jul 2012 22:48:02 +0100
parents c88a9972975b
children 2f5b169e4a3b
line wrap: on
line diff
--- a/NoteHypothesis.cpp	Fri Jul 13 22:14:01 2012 +0100
+++ b/NoteHypothesis.cpp	Fri Jul 13 22:48:02 2012 +0100
@@ -134,6 +134,7 @@
 NoteHypothesis::getMeanFrequency() const
 {
     double acc = 0.0;
+    if (m_pending.empty()) return acc;
     for (int i = 0; i < (int)m_pending.size(); ++i) {
         acc += m_pending[i].freq;
     }