diff --git a/Orange/widgets/gui.py b/Orange/widgets/gui.py index 0d2e36198f9..23e59e12aa2 100644 --- a/Orange/widgets/gui.py +++ b/Orange/widgets/gui.py @@ -2049,7 +2049,10 @@ def item2name(self, item): def __setitem__(self, index, item): def unselect(i): - item = self.listBox.item(i) + try: + item = self.listBox.item(i) + except RuntimeError: # Underlying C/C++ object has been deleted + item = None if item is None: # Labels changed before clearing the selection: clear everything self.listBox.selectionModel().clear()