Ebook viewer:Handle invalid bookmarks more gracefully

This commit is contained in:
Kovid Goyal 2009-07-05 12:27:16 -06:00
parent 0c067c9151
commit 1323f26b83

View File

@ -313,6 +313,8 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
self.view.goto_bookmark(m)
else:
self.pending_bookmark = bm
if spine_index < 0 or spine_index >= len(self.iterator.spine):
spine_index = 0
self.load_path(self.iterator.spine[spine_index])
def toc_clicked(self, index):