--- a/absyntax_utils/search_var_instance_decl.cc Fri Feb 22 21:09:59 2013 +0000
+++ b/absyntax_utils/search_var_instance_decl.cc Wed Apr 03 19:49:52 2013 +0100
@@ -105,6 +105,7 @@
this->current_vartype = none_vt;
this->current_option = none_opt;
this->search_name = get_var_name_c::get_name(variable);
+ if (NULL == search_scope) return NULL; // NOTE: This is not an ERROR! declaration_check_c, for e.g., relies on this returning NULL!
return (symbol_c *)search_scope->accept(*this);
}
@@ -112,6 +113,7 @@
this->current_vartype = none_vt;
this->current_option = none_opt;
this->search_name = get_var_name_c::get_name(variable);
+ if (NULL == search_scope) ERROR;
search_scope->accept(*this);
return this->current_vartype;
}
@@ -120,6 +122,7 @@
this->current_vartype = none_vt;
this->current_option = none_opt;
this->search_name = get_var_name_c::get_name(variable);
+ if (NULL == search_scope) ERROR;
search_scope->accept(*this);
return this->current_option;
}