mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix a regression in the previous release that caused spurious error message when doing some out of band searches. Fixes #1999936 [IndexError: tuple index out of range](https://bugs.launchpad.net/calibre/+bug/1999936)
This commit is contained in:
parent
1d866e0b6b
commit
6e5a424640
@ -620,6 +620,13 @@ class BooksModel(QAbstractTableModel): # {{{
|
||||
def current_changed(self, current, previous, emit_signal=True):
|
||||
if current.isValid():
|
||||
idx = current.row()
|
||||
try:
|
||||
self.db.id(idx)
|
||||
except Exception:
|
||||
# can happen if an out of band search is done causing the index
|
||||
# to no longer be valid since this function is now called after
|
||||
# an event loop tick.
|
||||
return
|
||||
try:
|
||||
data = self.get_book_display_info(idx)
|
||||
except Exception:
|
||||
|
Loading…
x
Reference in New Issue
Block a user