Skip to content

Commit

Permalink
Protect job updates to avoid accessing closed views. (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoTavares committed Jun 3, 2020
1 parent 30ca1f7 commit b52eeb0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cuegui/cuegui/CueJobMonitorTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,13 @@ def __processUpdateHandleNested(self, parent, groups):

for jobId in group.data.jobs:
job = opencue.api.getJob(jobId)
if job.id() in self._items:
self._items[job.id()].update(job, groupItem)
else:
self._items[job.id()] = JobWidgetItem(job, groupItem)
try:
if job.id() in self._items:
self._items[job.id()].update(job, groupItem)
else:
self._items[job.id()] = JobWidgetItem(job, groupItem)
except RuntimeError:
logger.warning("Failed to create tree item. RootView might be closed", exc_info=True)

def mouseDoubleClickEvent(self,event):
objects = self.selectedObjects()
Expand Down

0 comments on commit b52eeb0

Please sign in to comment.