mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-14 03:21:44 +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)
|
profile = core.get_display_profile_win32(handle, 1)
|
||||||
else:
|
else:
|
||||||
profile = core.get_display_profile_win32(handle or 0)
|
profile = core.get_display_profile_win32(handle or 0)
|
||||||
|
if profile is None:
|
||||||
|
return None
|
||||||
return ImageCmsProfile(profile)
|
return ImageCmsProfile(profile)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user