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
1 changed files with 5 additions and 5 deletions

View File

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