Fix segfault with -Wno-MODDUP

This commit is contained in:
Wilson Snyder 2010-01-08 14:03:00 -05:00
parent 0b9c6ed178
commit 6b7b2612a9

View File

@ -258,7 +258,8 @@ private:
nodep->v3warn(MODDUP,"Duplicate declaration of module: "<<nodep->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);
}