From 4dc3fb5ee66e22f67d40994db38d8bb282228c0e Mon Sep 17 00:00:00 2001 From: zeljko Date: Sat, 1 Jun 2019 07:11:21 +0000 Subject: [PATCH] LCL: TCustomTabControl fixed crash with nil Images property. patch by Luca Olivetti. issue #35646 git-svn-id: trunk@61308 - --- lcl/include/customnotebook.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lcl/include/customnotebook.inc b/lcl/include/customnotebook.inc index c01a88666b..796b3da333 100644 --- a/lcl/include/customnotebook.inc +++ b/lcl/include/customnotebook.inc @@ -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(