mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix IndexError when adding books, or conversion completes
This commit is contained in:
parent
96db861a22
commit
52762051ea
@ -176,7 +176,11 @@ class TagsModel(QAbstractItemModel):
|
||||
else:
|
||||
parent_item = parent.internalPointer()
|
||||
|
||||
child_item = parent_item.children[row]
|
||||
try:
|
||||
child_item = parent_item.children[row]
|
||||
except IndexError:
|
||||
return QModelIndex()
|
||||
|
||||
ans = self.createIndex(row, column, child_item)
|
||||
return ans
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user