[orca] Handle object going defunct on us during presentation generation



commit de90f901fa4fce7e27dff0d564625b25559b2c50
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Oct 16 14:03:52 2018 +0200

    Handle object going defunct on us during presentation generation

 src/orca/generator.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/generator.py b/src/orca/generator.py
index 6923d4784..36df1f0f3 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -411,7 +411,12 @@ class Generator:
         if role == pyatspi.ROLE_ICON:
             name = self._script.utilities.displayedText(obj) or ""
         else:
-            name = obj.name or ""
+            try:
+                name = obj.name
+            except:
+                msg = "ERROR: Exception getting name for %s" % obj
+                debug.println(debug.LEVEL_INFO, msg, True)
+                name = ""
 
         result = []
         if obj.description:


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