mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 14:49:28 +02:00
lcl: fixed a memory leak when canceling drag of dead control
git-svn-id: trunk@37371 -
This commit is contained in:
parent
136bb2bf67
commit
e4be3b0c67
@ -266,12 +266,8 @@ procedure TDragPerformer.Notification(AComponent: TComponent;
|
||||
begin
|
||||
if Operation = opRemove then
|
||||
begin
|
||||
if Assigned(FDragObject) then
|
||||
if (AComponent = FDragObject.Control) then
|
||||
DragStop(False)
|
||||
else
|
||||
if (AComponent = FDragObject.DragTarget) then
|
||||
DragMove(FDragObject.DragPos);
|
||||
if Assigned(FDragObject) and (AComponent = FDragObject.DragTarget) then
|
||||
DragMove(FDragObject.DragPos);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -782,6 +778,8 @@ begin
|
||||
if FDockSites.Count = 0 then
|
||||
FreeAndNil(FDockSites);
|
||||
end;
|
||||
if (AComponent is TControl) and Dragging(TControl(AComponent)) then
|
||||
DragStop(False);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user