* Fix from Luiz Americo to avoid crash when a freenotification is registered during destroy. (bug ID 23031)

git-svn-id: trunk@22589 -
This commit is contained in:
michael 2012-10-08 12:02:11 +00:00
parent d6c8ebc1b9
commit 3cafdc2a58

View File

@ -559,10 +559,6 @@ Procedure TComponent.FreeNotification(AComponent: TComponent);
begin
If (Owner<>Nil) and (AComponent=Owner) then exit;
if csDestroying in ComponentState then
AComponent.Notification(Self,opRemove)
else
begin
If not (Assigned(FFreeNotifies)) then
FFreeNotifies:=TFpList.Create;
If FFreeNotifies.IndexOf(AComponent)=-1 then
@ -570,7 +566,6 @@ begin
FFreeNotifies.Add(AComponent);
AComponent.FreeNotification (self);
end;
end;
end;