[orca] Handle traceback resulting from defunct accessible object



commit 25b625748c2c1633ba3d1a3019501d8e14e2794d
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Apr 18 11:14:15 2016 -0400

    Handle traceback resulting from defunct accessible object

 src/orca/script_utilities.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 925585d..bd39af5 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -1985,7 +1985,10 @@ class Utilities:
             return []
 
         hasRole = lambda x: x and x.getRole() == pyatspi.ROLE_LABEL
-        allLabels = pyatspi.findAllDescendants(root, hasRole)
+        try:
+            allLabels = pyatspi.findAllDescendants(root, hasRole)
+        except:
+            return []
         try:
             labels = [x for x in allLabels if not x.getRelationSet()]
             if onlyShowing:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]