TListView: fix potential AV in SetDropTarget. Issue #19083.

This commit is contained in:
Bart 2024-12-07 18:45:20 +01:00
parent 3e73ce083c
commit 4204fa7a65

View File

@ -1629,7 +1629,8 @@ end;
procedure TCustomListView.SetDropTarget(const AValue: TListItem);
begin
if not HandleAllocated then Exit;
TWSCustomListViewClass(WidgetSetClass).ItemSetState(Self, AValue.Index, AValue, lisDropTarget, True);
if AValue <> nil then
TWSCustomListViewClass(WidgetSetClass).ItemSetState(Self, AValue.Index, AValue, lisDropTarget, True);
end;
procedure TCustomListView.SetFocused(const AValue: TListItem);