LCL: Fix a memory leak of GDI handles in image list. Issue #28577, patch from C Western.

git-svn-id: trunk@49777 -
This commit is contained in:
juha 2015-09-07 22:01:15 +00:00
parent 7752d75830
commit 9e362ab5d4

View File

@ -1214,6 +1214,8 @@ var
then raise EInvalidGraphicOperation.Create('TCustomImageList.CreateImagesFromRawImage Create bitmaps');
InternalInsert(Count, ImgHandle, MaskHandle, Width, Height);
DeleteObject(ImgHandle);
DeleteObject(MaskHandle);
//DebugLn('CreateImagesFromRawImage B ',Img.Width,',',Img.Height,' ',Count);
Dec(NewCount);
end;