Fix #1900299 [icon_data corruption in windows_open_with.json](https://bugs.launchpad.net/calibre/+bug/1900299)

This commit is contained in:
Kovid Goyal 2020-10-18 12:00:33 +05:30
parent 20150e3368
commit 861fb8144f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -55,7 +55,7 @@ def entry_to_icon_text(entry, only_text=False):
if only_text: if only_text:
return entry.get('name', entry.get('Name')) or _('Unknown') return entry.get('name', entry.get('Name')) or _('Unknown')
data = entry.get('icon_data') data = entry.get('icon_data')
if data is None: if not isinstance(data, (bytearray, bytes)):
icon = QIcon(I('blank.png')) icon = QIcon(I('blank.png'))
else: else:
pmap = QPixmap() pmap = QPixmap()