mirror of
https://github.com/munki/munki.git
synced 2026-01-05 22:20:00 -06:00
Added fix to avoid crash while creating icon due to CGImageSourceCopyPropertiesAtIndex, in macOS 10.15.4 and above (#987)
This commit is contained in:
@@ -70,6 +70,9 @@ def convertIconToPNG(icon_path, destination_path,
|
||||
try:
|
||||
properties = CGImageSourceCopyPropertiesAtIndex(
|
||||
image_source, index, None)
|
||||
# perform not empty check for properties to prevent crash as CGImageSourceCopyPropertiesAtIndex sometimes fails in 10.15.4 and above
|
||||
if not properties:
|
||||
return False
|
||||
dpi = int(properties.get(kCGImagePropertyDPIHeight, 0))
|
||||
height = int(properties.get(kCGImagePropertyPixelHeight, 0))
|
||||
if (not candidate or
|
||||
|
||||
Reference in New Issue
Block a user