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
else
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;
ASelection.Delete(0);
end;
if ANode<>nil then ItemsTreeView.Selected:=ANode;
if FreeList then ASelection.Free;
if ANode<>nil then
ItemsTreeView.Selected:=ANode;
if FreeList then
ASelection.Free;
end;
constructor TProjectInspectorForm.Create(TheOwner: TComponent);