about summary refs log tree commit diff stats
path: root/036refcount.cc
diff options
context:
space:
mode:
Diffstat (limited to '036refcount.cc')
-rw-r--r--036refcount.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/036refcount.cc b/036refcount.cc
index 36aea6c0..09bb5d30 100644
--- a/036refcount.cc
+++ b/036refcount.cc
@@ -311,7 +311,10 @@ void compute_container_address_offsets(reagent& r, const string& location_for_er
 void compute_container_address_offsets(const type_tree* type, const string& location_for_error_messages) {
   if (!type) return;
   if (!type->atom) {
-    assert(type->left->atom);
+    if (!type->left->atom) {
+      raise << "invalid type " << to_string(type) << location_for_error_messages << '\n' << end();
+      return;
+    }
     if (type->left->name == "address")
       compute_container_address_offsets(type->right, location_for_error_messages);
     else if (type->left->name == "array")