LCL: TCustomTabControl fixed crash with nil Images property. patch by Luca Olivetti Issue #0035646

git-svn-id: branches/fixes_2_0@61481 -
This commit is contained in:
mattias 2019-06-26 15:08:05 +00:00
parent 18a0c25719
commit 1437060d73

View File

@ -1221,7 +1221,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(