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:
parent
3d305b33df
commit
8889886efd
|
|
@ -5362,6 +5362,7 @@ NetProc* PReturn::elaborate(Design*des, NetScope*scope) const
|
||||||
}
|
}
|
||||||
|
|
||||||
NetNet*res = target->find_signal(target->basename());
|
NetNet*res = target->find_signal(target->basename());
|
||||||
|
ivl_assert(*this, res);
|
||||||
ivl_variable_type_t lv_type = res->data_type();
|
ivl_variable_type_t lv_type = res->data_type();
|
||||||
unsigned long wid = res->vector_width();
|
unsigned long wid = res->vector_width();
|
||||||
NetAssign_*lv = new NetAssign_(res);
|
NetAssign_*lv = new NetAssign_(res);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue