diff --git a/src/V3LinkCells.cpp b/src/V3LinkCells.cpp index fc45ee4b7..c20e90c76 100644 --- a/src/V3LinkCells.cpp +++ b/src/V3LinkCells.cpp @@ -258,7 +258,8 @@ private: nodep->v3warn(MODDUP,"Duplicate declaration of module: "<prettyName()); foundp->v3warn(MODDUP,"... Location of original declaration"); } - nodep->unlinkFrBack()->deleteTree(); + nodep->unlinkFrBack(); + pushDeletep(nodep); nodep=NULL; } else if (!foundp) { m_mods.insert(nodep->name(), nodep); }