Don't include 2x version of icons that don't have a larger version.

This commit is contained in:
blitzmann
2018-10-13 20:49:56 -04:00
parent 20fbda9e7a
commit 7464de06b1
10 changed files with 5 additions and 0 deletions

View File

@@ -150,6 +150,11 @@ def get_icon_file(res_path, size):
if not os.path.isfile(fullpath):
return None
img = Image.open(fullpath)
if size > img.size:
# if we are requesting a size that is bigger than the source, return None. See #1769
return None
img = crop_image(img)
img.thumbnail(size, Image.ANTIALIAS)