diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-02-06 09:29:36 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-02-06 09:29:36 -0800 |
commit | 3e5f435842f4dbd23842c3a948840ac848cfbf26 (patch) | |
tree | 47885789d5727bd9e58b956196e904d53a3dde5f | |
parent | 0fe743f416de8b51d39de3f11973b3104c21117b (diff) | |
download | mu-3e5f435842f4dbd23842c3a948840ac848cfbf26.tar.gz |
2631
-rw-r--r-- | 045closure_name.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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(); |