mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Fix crashes when switching libraries with marked books
Fix a bug that could cause calibre to crash when switching from a large library to a smaller library with marked books. Fixes #1239210 [Calibre 1.6 64bits crashes when changing library](https://bugs.launchpad.net/calibre/+bug/1239210)
This commit is contained in:
parent
de2dbf73cd
commit
22289f95d4
@ -66,7 +66,7 @@ class HeaderView(QHeaderView): # {{{
|
||||
try:
|
||||
opt.icon = model.headerData(logical_index, opt.orientation, Qt.DecorationRole)
|
||||
opt.iconAlignment = Qt.AlignVCenter
|
||||
except TypeError:
|
||||
except (IndexError, ValueError, TypeError):
|
||||
pass
|
||||
if sm.isRowSelected(logical_index, QModelIndex()):
|
||||
opt.state |= QStyle.State_Sunken
|
||||
|
Loading…
x
Reference in New Issue
Block a user