about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--030container.cc4
1 files 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;
   }
e.html?id=07bedee34d9ded6f86904c7e4b4e02464ff8cb14'>07bedee ^
68834c5 ^
07bedee ^


183caad ^
07bedee ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50