mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix exception when opening book info popup window with no cover and fit cover checkbox checked
This commit is contained in:
parent
3ac4dc6e43
commit
f9bc895f0a
@ -341,7 +341,7 @@ class BookInfo(QDialog):
|
||||
self.cover.set_marked(self.marked)
|
||||
return
|
||||
pixmap = self.cover_pixmap
|
||||
if self.fit_cover.isChecked():
|
||||
if self.fit_cover.isChecked() and not pixmap.isNull():
|
||||
scaled, new_width, new_height = fit_image(pixmap.width(),
|
||||
pixmap.height(), self.cover.size().width()-10,
|
||||
self.cover.size().height()-10)
|
||||
|
Loading…
x
Reference in New Issue
Block a user