From 7b98f49db9f568c130b5930d1c4f76267105f2d7 Mon Sep 17 00:00:00 2001 From: ilor <ilor@vger.(none)> Date: Mon, 9 May 2011 13:21:55 +0200 Subject: [PATCH] fix crash when no -u given --- wccl-apps/wccl-rules.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wccl-apps/wccl-rules.cpp b/wccl-apps/wccl-rules.cpp index 8980c53..0df2f9e 100644 --- a/wccl-apps/wccl-rules.cpp +++ b/wccl-apps/wccl-rules.cpp @@ -231,7 +231,9 @@ int main(int argc, char** argv) try { const Corpus2::Tagset& tagset = Corpus2::get_named_tagset(tagset_load); RuleRunner runner(tagset); - runner.set_tag_rule_iterations(vm["until-done-iterations"].as<int>()); + if (vm.count("until-done-iterations")) { + runner.set_tag_rule_iterations(vm["until-done-iterations"].as<int>()); + } runner.use_progress(progress); foreach (const std::string& file, ccl_files) { std::pair<int,int> res = runner.load_more_rules(file); -- GitLab