about summary refs log tree commit diff stats
path: root/030container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-07-31 16:40:50 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-07-31 16:48:51 -0700
commit37a173b8a9c09ba96f6f8b75b89ae4e9521d5273 (patch)
tree6010a1f7e741e4527ce72eedacdfae204b563857 /030container.cc
parentf42272c0afbfa6b8295fd30e11994d4479e08f08 (diff)
downloadmu-37a173b8a9c09ba96f6f8b75b89ae4e9521d5273.tar.gz
1908 - another null-pointer warning
Diffstat (limited to '030container.cc')
-rw-r--r--030container.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/030container.cc b/030container.cc
index 15a6eb6f..41bba748 100644
--- a/030container.cc
+++ b/030container.cc
@@ -125,6 +125,11 @@ case GET: {
     products.resize(1);
     break;
   }
+  if (base_address == 0) {
+    raise << current_recipe_name() << ": tried to access location 0 in '" << current_instruction().to_string() << "'\n" << end();
+    products.resize(1);
+    break;
+  }
   assert(scalar(ingredients.at(1)));
   long long int offset = ingredients.at(1).at(0);
   long long int src = base_address;