Fix null pointer dereference in pform debug output.

This commit is contained in:
Martin Whitaker 2014-10-31 18:38:37 +00:00
parent 4f62a0d1f2
commit b286b76134
1 changed files with 2 additions and 1 deletions

View File

@ -610,7 +610,8 @@ void PFunction::elaborate_sig(Design*des, NetScope*scope) const
if (debug_elaborate) {
cerr << get_fileline() << ": PFunction::elaborate_sig: "
<< "return type: " << *ret_type << endl;
return_type_->pform_dump(cerr, 8);
if (return_type_)
return_type_->pform_dump(cerr, 8);
}
list<netrange_t> ret_unpacked;
ret_sig = new NetNet(scope, fname, NetNet::REG, ret_unpacked, ret_type);