From 3e5f435842f4dbd23842c3a948840ac848cfbf26 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 6 Feb 2016 09:29:36 -0800 Subject: 2631 --- 045closure_name.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/045closure_name.cc b/045closure_name.cc index 714d14d1..d16175b1 100644 --- a/045closure_name.cc +++ b/045closure_name.cc @@ -68,6 +68,10 @@ void collect_surrounding_spaces(const recipe_ordinal r) { } if (s->right) raise_error << "slot 0 should have a single value in /names, but got " << inst.products.at(j).to_string() << '\n' << end(); const string& surrounding_recipe_name = s->value; + if (surrounding_recipe_name.empty()) { + raise_error << "slot 0 doesn't initialize its /names property in recipe " << get(Recipe, r).name << end(); + continue; + } if (contains_key(Surrounding_space, r) && Surrounding_space[r] != get(Recipe_ordinal, surrounding_recipe_name)) { raise_error << "recipe " << get(Recipe, r).name << " can have only one 'surrounding' recipe but has " << get(Recipe, Surrounding_space[r]).name << " and " << surrounding_recipe_name << '\n' << end(); -- cgit 1.4.1-2-gfad0