UPD: add Exception Handle in TPixMapManager.CheckAddFileUniqueIcon() for Debug, issue #2519

This commit is contained in:
rich2014 2025-10-18 18:37:16 +08:00
commit 5ec21c44c6

View file

@ -1200,7 +1200,13 @@ begin
Exit;
image:= getBestNSImageWithSize(image, AIconSize);
if image = nil then
raise Exception.Create( AFullPath + ' in CheckAddFileUniqueIcon() Exception: step 1' );
bmpBitmap:= NSImageToTBitmap(image);
if bmpBitmap = nil then
raise Exception.Create( AFullPath + ' in CheckAddFileUniqueIcon() Exception: step 2' );
Result := FPixmapList.Add(bmpBitmap);
FPixmapsFileNames.Add(AFullPath, Pointer(Result));
finally