FIX: Source bitmap is too small

(cherry picked from commit 573441fc15)
This commit is contained in:
Alexander Koblov 2024-01-27 14:41:29 +03:00
commit 3e6578f18e

View file

@ -402,7 +402,8 @@ end;
function StretchBitmap(var bmBitmap : Graphics.TBitmap; iIconSize : Integer;
clBackColor : TColor; bFreeAtEnd : Boolean = False) : Graphics.TBitmap;
begin
if (iIconSize <> bmBitmap.Height) or (iIconSize <> bmBitmap.Width) then
if (bmBitmap.Height > 0) and (bmBitmap.Width > 0) and
((iIconSize <> bmBitmap.Height) or (iIconSize <> bmBitmap.Width)) then
begin
Result := Graphics.TBitMap.Create;
try