about summary refs log tree commit diff stats
path: root/021check_instruction.cc
diff options
context:
space:
mode:
Diffstat (limited to '021check_instruction.cc')
-rw-r--r--021check_instruction.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/021check_instruction.cc b/021check_instruction.cc
index afece2bf..6df7a2d1 100644
--- a/021check_instruction.cc
+++ b/021check_instruction.cc
@@ -88,7 +88,7 @@ bool types_match(reagent lhs, reagent rhs) {
 // (trees perform the same check recursively on each subtree)
 bool types_match(type_tree* lhs, type_tree* rhs) {
   if (!lhs) return true;
-  if (rhs->value == 0) {
+  if (!rhs || rhs->value == 0) {
     if (lhs->value == Type_ordinal["array"]) return false;
     if (lhs->value == Type_ordinal["address"]) return false;
     return size_of(rhs) == size_of(lhs);