LCL: grids: fix potential Access Violation

git-svn-id: trunk@57797 -
This commit is contained in:
hnb 2018-05-06 22:54:01 +00:00
parent ad5ec661f2
commit 42b24279aa

View File

@ -5388,7 +5388,7 @@ var
ResName: string;
begin
c := ColumnFromGridColumn(AColumnIndex);
if (c <> nil) and InRange(c.Title.FImageIndex, 0, FTitleImageList.Count - 1) then
if (c <> nil) and (FTitleImageList <> nil) and InRange(c.Title.FImageIndex, 0, FTitleImageList.Count - 1) then
begin
ImgIndex := c.Title.FImageIndex;
ImgLayout := c.Title.ImageLayout;