LCL: imglist: fix AV in GetBitmap if ImageIndex is invalid. Issue #33732

git-svn-id: trunk@57941 -
This commit is contained in:
ondrej 2018-05-15 06:50:14 +00:00
parent dd68a86a8e
commit d1e2c7a8f0

View File

@ -471,7 +471,7 @@ var
ListImg, DeviceImg: TLazIntfImage;
ImgHandle, MskHandle: HBitmap;
begin
if (FCount = 0) or (Image = nil) then Exit;
if (Index < 0) or (Index >= FCount) or (Image = nil) then Exit;
GetRawImage(Index, RawImg);