Add assert to protect against potentially dereferencing null pointer.

Assert is apropriate, since it's not expected that the returned value is NULL in this case.
This commit is contained in:
Purdea Andrei 2020-07-11 03:54:27 +03:00
parent 3d305b33df
commit 8889886efd
1 changed files with 1 additions and 0 deletions

View File

@ -5362,6 +5362,7 @@ NetProc* PReturn::elaborate(Design*des, NetScope*scope) const
}
NetNet*res = target->find_signal(target->basename());
ivl_assert(*this, res);
ivl_variable_type_t lv_type = res->data_type();
unsigned long wid = res->vector_width();
NetAssign_*lv = new NetAssign_(res);