diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-31 17:06:38 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-31 17:08:30 -0700 |
commit | 18e626dfe83c21822debc6f5a56eaea2b3102220 (patch) | |
tree | bf09bff528d2fefb72bd2349cb05cfa362d7156a /033exclusive_container.cc | |
parent | 37a173b8a9c09ba96f6f8b75b89ae4e9521d5273 (diff) | |
download | mu-18e626dfe83c21822debc6f5a56eaea2b3102220.tar.gz |
1909 - clean up all null pointers of that ilk
Diffstat (limited to '033exclusive_container.cc')
-rw-r--r-- | 033exclusive_container.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/033exclusive_container.cc b/033exclusive_container.cc index 65995b14..eb3ff6f2 100644 --- a/033exclusive_container.cc +++ b/033exclusive_container.cc @@ -90,6 +90,10 @@ case MAYBE_CONVERT: { } reagent base = canonize(current_instruction().ingredients.at(0)); long long int base_address = base.value; + if (base_address == 0) { + raise << current_recipe_name() << ": tried to access location 0 in '" << current_instruction().to_string() << "'\n" << end(); + break; + } type_ordinal base_type = base.types.at(0); if (Type[base_type].kind != exclusive_container) { raise << current_recipe_name () << ": first ingredient of 'maybe-convert' should be an exclusive-container, but got " << base.original_string << '\n' << end(); |