Fix #2002753 [Error when ejecting while in Device Mode](https://bugs.launchpad.net/calibre/+bug/2002753)

This commit is contained in:
Kovid Goyal 2023-01-13 07:46:38 +05:30
parent 882d565491
commit 4c89a7e697
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1701,6 +1701,10 @@ class DeviceBooksModel(BooksModel): # {{{
def current_changed(self, current, previous, emit_signal=True):
if current.isValid():
idx = current.row()
try:
self.db[self.map[idx]]
except Exception:
return # can happen if the device is ejected
try:
data = self.get_book_display_info(idx)
except Exception: