From 5b973e3c925118f675909c984cd8db464c96e271 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 21 Jun 2010 21:38:46 +0200 Subject: [PATCH] Fixed: #992 Infinite loop and crash when a parent sheet is the same file as self --- code/nel/src/georges/form_elm.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/nel/src/georges/form_elm.cpp b/code/nel/src/georges/form_elm.cpp index 0f6cfaa65..9991187a6 100644 --- a/code/nel/src/georges/form_elm.cpp +++ b/code/nel/src/georges/form_elm.cpp @@ -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;