diff --git a/src/V3Life.cpp b/src/V3Life.cpp index 5724da536..5e0a48391 100644 --- a/src/V3Life.cpp +++ b/src/V3Life.cpp @@ -329,7 +329,7 @@ private: // Has to be direct assignment without any EXTRACTing. if (nodep->lhsp()->castVarRef() && !m_sideEffect) { AstVarScope* vscp = nodep->lhsp()->castVarRef()->varScopep(); - if (!vscp) vscp->v3fatalSrc("Scope lost on variable"); + if (!vscp) nodep->v3fatalSrc("Scope lost on variable"); m_lifep->simpleAssign(vscp, nodep); } else { nodep->lhsp()->iterateAndNext(*this);