mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Merge pull request #4372 from nulano/cms
Return None if display profile not found in ImageCms.get_display_profile
This commit is contained in:
commit
93483a7eeb
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user