diff --git a/src/V3Inline.cpp b/src/V3Inline.cpp index 87bba97ea..0c1a11ef1 100644 --- a/src/V3Inline.cpp +++ b/src/V3Inline.cpp @@ -510,6 +510,7 @@ private: // delete it in later optimizations. AstVar* pinOldVarp = pinp->modVarp(); AstVar* pinNewVarp = pinOldVarp->clonep(); + if (!pinNewVarp) pinOldVarp->v3fatalSrc("Cloning failed"); AstNode* connectRefp = pinp->exprp(); if (!connectRefp->castConst() && !connectRefp->castVarRef()) {