Fix caused a double freeing, fixed.
This commit is contained in:
parent
388f91d1d0
commit
131f05711d
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user