IDE: fix crash when deleting a unit from project.

git-svn-id: trunk@30064 -
This commit is contained in:
juha 2011-03-29 08:54:02 +00:00
parent f6d82e6429
commit 9c9664129f

View File

@ -981,12 +981,15 @@ begin
ANode:=ItemsTreeView.Items.GetFirstNode ANode:=ItemsTreeView.Items.GetFirstNode
else else
ANode:=ANode.GetFirstChild; ANode:=ANode.GetFirstChild;
while ANode.Text<>CurText do ANode:=ANode.GetNextSibling; while (ANode<>nil) and (ANode.Text<>CurText) do
ANode:=ANode.GetNextSibling;
if ANode=nil then break; if ANode=nil then break;
ASelection.Delete(0); ASelection.Delete(0);
end; end;
if ANode<>nil then ItemsTreeView.Selected:=ANode; if ANode<>nil then
if FreeList then ASelection.Free; ItemsTreeView.Selected:=ANode;
if FreeList then
ASelection.Free;
end; end;
constructor TProjectInspectorForm.Create(TheOwner: TComponent); constructor TProjectInspectorForm.Create(TheOwner: TComponent);