From 22289f95d44c98490a0f537b55139917f2d622af Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 13 Oct 2013 07:36:49 +0530 Subject: [PATCH] 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) --- src/calibre/gui2/library/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/library/views.py b/src/calibre/gui2/library/views.py index 5aef45005f..aa20670738 100644 --- a/src/calibre/gui2/library/views.py +++ b/src/calibre/gui2/library/views.py @@ -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