diff --git a/src/orca/focus_tracking_presenter.py b/src/orca/focus_tracking_presenter.py index ca580b0..dae1a36 100644 --- a/src/orca/focus_tracking_presenter.py +++ b/src/orca/focus_tracking_presenter.py @@ -537,8 +537,12 @@ class FocusTrackingPresenter(presentation_manager.PresentationManager): # can cause hangs. # if event.source: - state = event.source.getState() - if state.contains(pyatspi.STATE_DEFUNCT): + state = None + try: + state = event.source.getState() + except LookupError: + pass + if state == None or state.contains(pyatspi.STATE_DEFUNCT): debug.println(debug.LEVEL_FINEST, "IGNORING DEFUNCT OBJECT") if event.type.startswith("window:deactivate"):