mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix #2002753 [Error when ejecting while in Device Mode](https://bugs.launchpad.net/calibre/+bug/2002753)
This commit is contained in:
parent
882d565491
commit
4c89a7e697
@ -1701,6 +1701,10 @@ class DeviceBooksModel(BooksModel): # {{{
|
|||||||
def current_changed(self, current, previous, emit_signal=True):
|
def current_changed(self, current, previous, emit_signal=True):
|
||||||
if current.isValid():
|
if current.isValid():
|
||||||
idx = current.row()
|
idx = current.row()
|
||||||
|
try:
|
||||||
|
self.db[self.map[idx]]
|
||||||
|
except Exception:
|
||||||
|
return # can happen if the device is ejected
|
||||||
try:
|
try:
|
||||||
data = self.get_book_display_info(idx)
|
data = self.get_book_display_info(idx)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user