[orca/gnome-3-20] Handle another case of objects going defunct on us



commit cc91e44cd54169ca08d1e0410b9fd38b06de4f8b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Jun 9 07:50:55 2016 -0400

    Handle another case of objects going defunct on us

 src/orca/script_utilities.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 00dccf3..3fba22a 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -3485,7 +3485,14 @@ class Utilities:
         return table.getAccessibleAt(row, column)
 
     def isLastCell(self, obj):
-        if not (obj and obj.getRole() == pyatspi.ROLE_TABLE_CELL):
+        try:
+            role = obj.getRole()
+        except:
+            msg = "ERROR: Exception getting role of %s" % obj
+            debug.println(debug.LEVEL_INFO, msg, True)
+            return False
+
+        if not role == pyatspi.ROLE_TABLE_CELL:
             return False
 
         isTable = lambda x: x and 'Table' in pyatspi.listInterfaces(x)


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