Don't crash if function is not found.
This commit is contained in:
parent
bc77a19059
commit
096e53dea4
|
|
@ -2054,6 +2054,12 @@ NetExpr* PECallFunction::elaborate_expr_method_(Design*des, NetScope*scope,
|
|||
perm_string method_name = peek_tail_name(use_path);
|
||||
use_path.pop_back();
|
||||
|
||||
// If there is no object to the left of the method name, then
|
||||
// give up on the idea of looking for an object method.
|
||||
if (use_path.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
NetNet *net = 0;
|
||||
const NetExpr *par;
|
||||
NetEvent *eve;
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ bool symbol_search(const LineInfo*li, Design*des, NetScope*scope,
|
|||
assert(scope);
|
||||
bool prefix_scope = false;
|
||||
bool recurse_flag = false;
|
||||
|
||||
ivl_assert(*li, ! path.empty());
|
||||
name_component_t path_tail = path.back();
|
||||
path.pop_back();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue