diff --git a/tgt-vhdl/vhdl_syntax.cc b/tgt-vhdl/vhdl_syntax.cc index 12e9d4afb..a4841f762 100644 --- a/tgt-vhdl/vhdl_syntax.cc +++ b/tgt-vhdl/vhdl_syntax.cc @@ -315,7 +315,8 @@ void vhdl_signal_decl::emit(std::ofstream &of, int level) const vhdl_expr::~vhdl_expr() { - delete type_; + if (type != NULL) + delete type_; } /*