only do a case insensitive name check, if the component is initialized (issue )

git-svn-id: trunk@9060 -
This commit is contained in:
vincents 2006-04-01 19:32:44 +00:00
parent 4b0d47d1c7
commit 6e2aedbb9a

View File

@ -1978,6 +1978,11 @@ var
i: Integer;
CurComponent: TComponent;
begin
// check if component is initialized
if (CurName='') or (NewName='')
or ((AComponent<>nil) and (csDestroying in AComponent.ComponentState)) then
exit;
// check, if there is already such a component
for i:=0 to FLookupRoot.ComponentCount-1 do begin
CurComponent:=FLookupRoot.Components[i];
@ -1988,10 +1993,6 @@ begin
end;
end;
// check if component is initialized
if (CurName='') or (NewName='')
or ((AComponent<>nil) and (csDestroying in AComponent.ComponentState)) then
exit;
// check if component is the LookupRoot
if AComponent=nil then AComponent:=FLookupRoot;
// consistency check