about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--059shape_shifting_recipe.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/059shape_shifting_recipe.cc b/059shape_shifting_recipe.cc
index 6e65e344..9de67a30 100644
--- a/059shape_shifting_recipe.cc
+++ b/059shape_shifting_recipe.cc
@@ -502,7 +502,7 @@ void ensure_all_concrete_types(/*const*/ recipe& new_recipe, const recipe& exemp
 void ensure_all_concrete_types(/*const*/ reagent& x, const recipe& exemplar) {
   if (!x.type || contains_type_ingredient_name(x.type)) {
     raise_error << maybe(exemplar.name) << "failed to map a type to " << x.original_string << '\n' << end();
-    x.type = new type_tree("", 0);  // just to prevent crashes later
+    if (!x.type) x.type = new type_tree("", 0);  // just to prevent crashes later
     return;
   }
   if (x.type->value == -1) {