Merge pull request #4372 from nulano/cms

Return None if display profile not found in ImageCms.get_display_profile
This commit is contained in:
Hugo van Kemenade 2020-03-25 21:06:10 +02:00 committed by GitHub
commit 93483a7eeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)