Fixed: #992 Infinite loop and crash when a parent sheet is the same file as self

This commit is contained in:
kervala 2010-06-21 21:38:46 +02:00
parent 5ab69cc44f
commit 5b973e3c92

View file

@ -1382,6 +1382,12 @@ exit:;
CForm *parentPtr = form->getParent (parent);
nlassert (parentPtr);
if (parentPtr->getFilename() == form->getFilename())
{
nlerror("parent is identical to current sheet %s!", form->getFilename().c_str());
return false;
}
// Get the node by name in the parent
const CFormDfn *parentDfnParent = NULL;
uint indexDfnParent = 0xffffffff;