IDE: notifying referred units: ignoring components with csDestroying

git-svn-id: trunk@16018 -
This commit is contained in:
mattias 2008-08-10 21:20:32 +00:00
parent 9826f7615d
commit d80f64ab53
2 changed files with 11 additions and 0 deletions

View File

@ -3179,6 +3179,14 @@ begin
ReadNextAtom;
AtomIsIdentifier(true);
OldPos:=CurPos.StartPos;
ReadNextAtom;
if CurPos.Flag=cafPoint then begin
// unit.type
ReadNextAtom;
AtomIsIdentifier(true);
OldPos:=CurPos.StartPos;
ReadNextAtom;
end;
// property has type
Params.Save(OldInput);
Params.SetIdentifier(Self,@Src[CurPos.StartPos],nil);

View File

@ -3888,6 +3888,8 @@ procedure TProject.FindUnitsUsingSubComponent(SubComponent: TComponent;
CurCount: Word;
ReferenceComponent: TComponent;
begin
if csDestroying in AComponent.ComponentState then exit;
// read all properties and remove doubles
TypeInfo:=PTypeInfo(AComponent.ClassInfo);
repeat
@ -3933,6 +3935,7 @@ begin
OwnerComponent:=nil;
AnUnitInfo:=FirstUnitWithComponent;
while AnUnitInfo<>nil do begin
if csDestroying in AnUnitInfo.Component.ComponentState then continue;
if AnUnitInfo.Component<>OwnerComponent then begin
Search(AnUnitInfo,AnUnitInfo.Component);
for i:=AnUnitInfo.Component.ComponentCount-1 downto 0 do