laz_xmlcfg: fixed caching of top level if no doc

git-svn-id: trunk@31237 -
This commit is contained in:
mattias 2011-06-15 07:27:06 +00:00
parent 8e2bc497ff
commit 64f265173b

View File

@ -524,8 +524,8 @@ begin
//debugln(['TXMLConfig.InternalFindNode APath="',copy(APath,1,PathLen),'" CreateNodes=',CreateNodes]);
PathIndex:=0;
Result:=GetPathNodeCache(PathIndex);
if Result=nil then begin
Result := TDOMElement(doc.FindNode('CONFIG'));
if (Result=nil) and (doc<>nil) then begin
Result:=TDOMElement(doc.FindNode('CONFIG'));
SetPathNodeCache(PathIndex,Result);
end;
if PathLen=0 then exit;