Fix bad memory reference.
The expression for the repeat expression was deleted before the tests for expression sanity.
This commit is contained in:
parent
9b5ef0bbb9
commit
15702f1b87
|
|
@ -1320,9 +1320,9 @@ NetNet* PEConcat::elaborate_net(Design*des, NetScope*scope,
|
|||
unsigned repeat = 1;
|
||||
|
||||
if (repeat_) {
|
||||
NetExpr*etmp = elab_and_eval(des, scope, repeat_);
|
||||
assert(etmp);
|
||||
NetEConst*erep = dynamic_cast<NetEConst*>(etmp);
|
||||
auto_ptr<NetExpr> etmp (elab_and_eval(des, scope, repeat_));
|
||||
assert(etmp.get());
|
||||
NetEConst*erep = dynamic_cast<NetEConst*>(etmp.get());
|
||||
|
||||
if (erep == 0) {
|
||||
cerr << get_line() << ": internal error: Unable to "
|
||||
|
|
@ -1332,7 +1332,6 @@ NetNet* PEConcat::elaborate_net(Design*des, NetScope*scope,
|
|||
}
|
||||
|
||||
repeat = erep->value().as_ulong();
|
||||
delete etmp;
|
||||
|
||||
if (repeat == 0) {
|
||||
cerr << get_line() << ": error: Concatenation repeat "
|
||||
|
|
|
|||
Loading…
Reference in New Issue