fixed mem leak

git-svn-id: trunk@9681 -
This commit is contained in:
mattias 2006-07-25 22:53:21 +00:00
parent a7e155bb65
commit e22f30c84d

View File

@ -334,7 +334,7 @@ begin
TDOMElement(Node).RemoveAttribute(NodeName);
FModified := True;
end;
while (Node.ChildNodes.Count=0) and (Node.ParentNode<>nil)
while (Node.FirstChild=nil) and (Node.ParentNode<>nil)
and (Node.ParentNode.ParentNode<>nil) do begin
if (Node is TDOMElement) and (not TDOMElement(Node).IsEmpty) then break;
ParentNode:=Node.ParentNode;