[orca] Handle yet another object going defunct on us



commit 35b663978be1fa73eb974c44c6d84e4668df0134
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Oct 18 14:31:38 2018 +0200

    Handle yet another object going defunct on us

 src/orca/scripts/toolkits/gtk/script_utilities.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/toolkits/gtk/script_utilities.py 
b/src/orca/scripts/toolkits/gtk/script_utilities.py
index a46a7bef6..3b708ce9c 100644
--- a/src/orca/scripts/toolkits/gtk/script_utilities.py
+++ b/src/orca/scripts/toolkits/gtk/script_utilities.py
@@ -92,7 +92,10 @@ class Utilities(script_utilities.Utilities):
         return rv
 
     def isTypeahead(self, obj):
-        if not (obj and obj.getRole() == pyatspi.ROLE_TEXT):
+        if not obj or self.isDead(obj):
+            return False
+
+        if obj.getRole() != pyatspi.ROLE_TEXT:
             return False
 
         rv = self._isTypeahead.get(hash(obj))


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