mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +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