[orca] Handle broken accessibility tree when generating labelOrName



commit 6a7ecbe0c5c50581e1e5206e8baf3e5f17b089bd
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Feb 8 15:06:23 2019 -0500

    Handle broken accessibility tree when generating labelOrName

 src/orca/speech_generator.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 68ac62d70..cafe3d16f 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -182,7 +182,7 @@ class SpeechGenerator(generator.Generator):
             if name:
                 result.append(name)
                 result.extend(acss)
-        if not result and obj.parent.getRole() == pyatspi.ROLE_AUTOCOMPLETE:
+        if not result and obj.parent and obj.parent.getRole() == pyatspi.ROLE_AUTOCOMPLETE:
             result = self._generateLabelOrName(obj.parent, **args)
 
         return result


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