Fix double clicking on chapter heading in highlights panel causing an exception

This commit is contained in:
Kovid Goyal 2020-09-07 08:38:02 +05:30
parent 1f7be299fd
commit 5b33fe6884
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -292,7 +292,9 @@ class Highlights(QTreeWidget):
return False
def item_activated(self, item):
self.jump_to_highlight.emit(item.data(0, Qt.UserRole))
h = item.data(0, Qt.UserRole)
if h is not None:
self.jump_to_highlight.emit(h)
@property
def current_highlight(self):