summaryrefslogtreecommitdiff
path: root/decoder/inside_outside.h
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/inside_outside.h')
-rw-r--r--decoder/inside_outside.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/inside_outside.h b/decoder/inside_outside.h
index 73d4ec6a..e6289176 100644
--- a/decoder/inside_outside.h
+++ b/decoder/inside_outside.h
@@ -55,7 +55,7 @@ WeightType Inside(const Hypergraph& hg,
*cur_node_inside_score += score;
}
}
- return inside_score.back();
+ return inside_score.empty() ? WeightType(0) : inside_score.back();
}
template<class WeightType, class WeightFunction>