LCL: TCustomTabControl fixed crash with nil Images property. patch by Luca Olivetti. issue #35646

git-svn-id: trunk@61308 -
This commit is contained in:
zeljko 2019-06-01 07:11:21 +00:00
parent 75accac5aa
commit 4dc3fb5ee6

View File

@ -1201,7 +1201,12 @@ end;
procedure TCustomTabControl.DoImageListChange(Sender: TObject);
begin
if HandleAllocated then
TWSCustomTabControlClass(WidgetSetClass).SetImageList(Self, Images.ResolutionForPPI[ImagesWidth, Font.PixelsPerInch, 1].Resolution); // to-do: support scaling factor
begin
if Assigned(Images) then
TWSCustomTabControlClass(WidgetSetClass).SetImageList(Self, Images.ResolutionForPPI[ImagesWidth, Font.PixelsPerInch, 1].Resolution) // to-do: support scaling factor
else
TWSCustomTabControlClass(WidgetSetClass).SetImageList(Self, nil);
end;
end;
procedure TCustomTabControl.DoImageListDestroyResolutionHandle(