1
0
mirror of synced 2024-11-22 01:53:50 +00:00

Fix caused a double freeing, fixed.

This commit is contained in:
Mark van Renswoude 2010-07-12 08:01:32 +00:00
parent 388f91d1d0
commit 131f05711d

View File

@ -741,15 +741,15 @@ var
listIndex: Integer; listIndex: Integer;
begin begin
if csDestroying in ComponentState then
Exit;
graphicIndex := AGraphic.Index; graphicIndex := AGraphic.Index;
if graphicIndex > -1 then if graphicIndex > -1 then
begin
if not (csDestroying in ComponentState) then
begin begin
for listIndex := Pred(Lists.Count) downto 0 do for listIndex := Pred(Lists.Count) downto 0 do
TX2GraphicList(Lists[listIndex]).DeleteImage(graphicIndex); TX2GraphicList(Lists[listIndex]).DeleteImage(graphicIndex);
end;
GraphicsList.Delete(graphicIndex); GraphicsList.Delete(graphicIndex);
AGraphic.InternalSetContainer(nil); AGraphic.InternalSetContainer(nil);