[orca] Add null check for description-list role methods
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Add null check for description-list role methods
- Date: Fri, 17 Jun 2022 16:09:09 +0000 (UTC)
commit 37590264dba81d47aed4d0e6d61a293b0e893dab
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 ea2ceeee7..3775a5da3 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -1218,13 +1218,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]