mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Return a null pixmap rather than failing
This commit is contained in:
parent
06432e4eee
commit
9cd8e43040
@ -1305,8 +1305,7 @@ class Application(QApplication):
|
||||
@lru_cache(maxsize=256)
|
||||
def cached_qpixmap(self, name):
|
||||
ic = QIcon.ic(name)
|
||||
pmap = ic.pixmap(ic.availableSizes()[0])
|
||||
return pmap
|
||||
return ic.pixmap((ic.availableSizes() or (256,))[0])
|
||||
|
||||
def on_palette_change(self):
|
||||
self.cached_qimage.cache_clear()
|
||||
|
Loading…
x
Reference in New Issue
Block a user