summaryrefslogtreecommitdiff
path: root/decoder/tree2string_translator.cc
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2014-04-01 21:24:11 -0400
committerChris Dyer <redpony@gmail.com>2014-04-01 21:24:11 -0400
commitb6925f42fb7518fa1a201fe20596f8d4036a3b80 (patch)
tree76433c16b1e311fcbc1c18ada8e78d4ba6b984ee /decoder/tree2string_translator.cc
parent4025e1cdd57ac678eab2f10deceeaa2a04549144 (diff)
check for empty hg
Diffstat (limited to 'decoder/tree2string_translator.cc')
-rw-r--r--decoder/tree2string_translator.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/tree2string_translator.cc b/decoder/tree2string_translator.cc
index 6966ccf8..6f65658e 100644
--- a/decoder/tree2string_translator.cc
+++ b/decoder/tree2string_translator.cc
@@ -214,7 +214,7 @@ struct Tree2StringTranslatorImpl {
// the following takes care of them
vector<bool> prune(hg.edges_.size(), false);
hg.PruneEdges(prune, true);
-
+ if (hg.edges_.size() == 0) return false;
//hg.PrintGraphviz();
minus_lm_forest->swap(hg);
return true;