[orca/gnome-42] Add null check for description-list role methods



commit 6d080a2eed7992ee57e6ae9f3ec01e565f6962b4
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Jun 17 18:07:38 2022 +0200

    Add null check for description-list role methods

 src/orca/script_utilities.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 40b834282..4e72aaa8b 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -1202,13 +1202,13 @@ class Utilities:
         return obj and obj.getRole() == pyatspi.ROLE_BLOCK_QUOTE
 
     def isDescriptionList(self, obj):
-        return obj.getRole() == pyatspi.ROLE_DESCRIPTION_LIST
+        return obj and obj.getRole() == pyatspi.ROLE_DESCRIPTION_LIST
 
     def isDescriptionListTerm(self, obj):
-        return obj.getRole() == pyatspi.ROLE_DESCRIPTION_TERM
+        return obj and obj.getRole() == pyatspi.ROLE_DESCRIPTION_TERM
 
     def isDescriptionListDescription(self, obj):
-        return obj.getRole() == pyatspi.ROLE_DESCRIPTION_VALUE
+        return obj and obj.getRole() == pyatspi.ROLE_DESCRIPTION_VALUE
 
     def isDocumentList(self, obj):
         if not (obj and obj.getRole() in [pyatspi.ROLE_LIST, pyatspi.ROLE_DESCRIPTION_LIST]):


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