LCL: Prevent crash by calling ShowDragImage/HideDragImage only if DragImageListResolution is not nil.

git-svn-id: trunk@65055 -
This commit is contained in:
balazs 2021-04-23 14:40:42 +00:00
parent 492321d819
commit 25a1c56fc2

View File

@ -138,8 +138,12 @@ end;
Hide dragging image without unlocking of window
}
procedure TDragImageList.HideDragImage;
var
DragImageListResolution: TDragImageListResolution;
begin
GetDraggingResolution.HideDragImage;
DragImageListResolution := GetDraggingResolution;
if DragImageListResolution <> nil then
DragImageListResolution.HideDragImage;
end;
{
@ -176,8 +180,12 @@ end;
Show dragging image
}
procedure TDragImageList.ShowDragImage;
var
DragImageListResolution: TDragImageListResolution;
begin
GetDraggingResolution.ShowDragImage;
DragImageListResolution := GetDraggingResolution;
if DragImageListResolution <> nil then
DragImageListResolution.ShowDragImage;
end;
{ TDragImageListResolution }