about summary refs log tree commit diff stats
path: root/033exclusive_container.cc
diff options
context:
space:
mode:
Diffstat (limited to '033exclusive_container.cc')
-rw-r--r--033exclusive_container.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/033exclusive_container.cc b/033exclusive_container.cc
index e2f520f8..42993231 100644
--- a/033exclusive_container.cc
+++ b/033exclusive_container.cc
@@ -93,8 +93,7 @@ case MAYBE_CONVERT: {
     raise << current_recipe_name() << ": tried to access location 0 in '" << current_instruction().to_string() << "'\n" << end();
     break;
   }
-  type_ordinal base_type = base.types.at(0);
-  if (Type[base_type].kind != exclusive_container) {
+  if (base.types.empty() || Type[base.types.at(0)].kind != exclusive_container) {
     raise << current_recipe_name () << ": first ingredient of 'maybe-convert' should be an exclusive-container, but got " << base.original_string << '\n' << end();
     break;
   }