fix #727 gtk exception when hiding deleted episodes
background update sometimes operates on destroyed? widget, so catch the exception and abort silently
This commit is contained in:
parent
9a7faa48d9
commit
c1ad49659b
1 changed files with 7 additions and 2 deletions
|
@ -131,8 +131,13 @@ class BackgroundUpdate(object):
|
|||
(model.C_PUBLISHED, episode.published),
|
||||
)
|
||||
update_fields = model.get_update_fields(episode, include_description)
|
||||
model.set(model.get_iter((self.index,)), *(x for fields in (base_fields, update_fields)
|
||||
for pair in fields for x in pair))
|
||||
try:
|
||||
it = model.get_iter((self.index,))
|
||||
# fix #727 the tree might be invalid when trying to update so discard the exception
|
||||
except ValueError:
|
||||
break
|
||||
model.set(it, *(x for fields in (base_fields, update_fields)
|
||||
for pair in fields for x in pair))
|
||||
self.index += 1
|
||||
|
||||
# Check for the time limit of 20 ms after each 50 rows processed
|
||||
|
|
Loading…
Reference in a new issue