From: sbh Date: Wed, 14 Jan 2015 12:42:47 +0000 (+0300) Subject: Issue #328: bug with hanging of the app on absent file sourcing fixed X-Git-Tag: V_1.0.0~39 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c6a92152ecb67e86489d0a17c8df5fa2e5bcf84e;p=modules%2Fshaper.git Issue #328: bug with hanging of the app on absent file sourcing fixed --- diff --git a/src/Config/Config_WidgetReader.cpp b/src/Config/Config_WidgetReader.cpp index 4899fe190..c8ea412d8 100644 --- a/src/Config/Config_WidgetReader.cpp +++ b/src/Config/Config_WidgetReader.cpp @@ -69,17 +69,16 @@ void Config_WidgetReader::resolveSourceNodes(xmlNodePtr theNode) if (isNode(aNode, NODE_SOURCE, NULL)) { Config_XMLReader aSourceReader = Config_XMLReader(getProperty(aNode, SOURCE_FILE)); xmlNodePtr aSourceRoot = aSourceReader.findRoot(); - if (!aSourceRoot) { - continue; + if (aSourceRoot) { + xmlNodePtr aSourceNode = xmlFirstElementChild(aSourceRoot); + xmlNodePtr aTargetNode = xmlDocCopyNodeList(aNode->doc, aSourceNode); + while (aTargetNode != NULL) { + xmlNodePtr aNextNode = xmlNextElementSibling(aTargetNode); + xmlAddPrevSibling(aNode, aTargetNode); + aTargetNode = aNextNode; + } + aSourceNodes.push_back(aNode); } - xmlNodePtr aSourceNode = xmlFirstElementChild(aSourceRoot); - xmlNodePtr aTargetNode = xmlDocCopyNodeList(aNode->doc, aSourceNode); - while (aTargetNode != NULL) { - xmlNodePtr aNextNode = xmlNextElementSibling(aTargetNode); - xmlAddPrevSibling(aNode, aTargetNode); - aTargetNode = aNextNode; - } - aSourceNodes.push_back(aNode); } aNode = xmlNextElementSibling(aNode); }