From 91dc725fa34e86111ceacc63c86bd75aa06e9c83 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 7 Dec 2015 20:03:05 -0800 Subject: 2618 --- 030container.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/030container.cc b/030container.cc index afe08952..1bae0da5 100644 --- a/030container.cc +++ b/030container.cc @@ -137,7 +137,7 @@ case GET: { } reagent base = inst.ingredients.at(0); // new copy for every invocation // Update GET base in Check - if (!base.type || !base.type->value || get(Type, base.type->value).kind != CONTAINER) { + if (!base.type || !base.type->value || !contains_key(Type, base.type->value) || get(Type, base.type->value).kind != CONTAINER) { raise_error << maybe(get(Recipe, r).name) << "first ingredient of 'get' should be a container, but got " << inst.ingredients.at(0).original_string << '\n' << end(); break; } @@ -275,7 +275,7 @@ case GET_ADDRESS: { } reagent base = inst.ingredients.at(0); // Update GET_ADDRESS base in Check - if (!base.type || get(Type, base.type->value).kind != CONTAINER) { + if (!base.type || !base.type->value || !contains_key(Type, base.type->value) || get(Type, base.type->value).kind != CONTAINER) { raise_error << maybe(get(Recipe, r).name) << "first ingredient of 'get-address' should be a container, but got " << inst.ingredients.at(0).original_string << '\n' << end(); break; } -- cgit 1.4.1-2-gfad0