return None if display profile not found in ImageCms.get_display_profile

This commit is contained in:
nulano 2020-01-19 23:12:57 +00:00 committed by Andrew Murray
parent 29fee8fc43
commit 309291563a

View File

@ -263,6 +263,8 @@ def get_display_profile(handle=None):
profile = core.get_display_profile_win32(handle, 1)
else:
profile = core.get_display_profile_win32(handle or 0)
if profile is None:
return None
return ImageCmsProfile(profile)