don't add label to m_targetLabelSet if no hypotheses. Assert error in parsing

This commit is contained in:
Hieu Hoang 2014-04-23 17:11:25 +01:00
parent 2c14b506b4
commit d7380d6d9e

View File

@ -114,8 +114,11 @@ void ChartCell::SortHypotheses()
MapType::iterator iter;
for (iter = m_hypoColl.begin(); iter != m_hypoColl.end(); ++iter) {
ChartHypothesisCollection &coll = iter->second;
coll.SortHypotheses();
m_targetLabelSet.AddConstituent(iter->first, &coll.GetSortedHypotheses());
if (coll.GetSize()) {
coll.SortHypotheses();
m_targetLabelSet.AddConstituent(iter->first, &coll.GetSortedHypotheses());
}
}
}