[orca] Prevent a couple of unneeded debugging messages



commit 26bf029cd178e7de0d10ff750729fc7478fea302
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Nov 20 18:22:54 2019 -0500

    Prevent a couple of unneeded debugging messages

 src/orca/script_utilities.py             | 3 +++
 src/orca/scripts/web/script_utilities.py | 3 +++
 2 files changed, 6 insertions(+)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 7e65c7615..7613ee5aa 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -2348,6 +2348,9 @@ class Utilities:
         return not (extents.width and extents.height)
 
     def _findAllDescendants(self, root, includeIf, excludeIf, matches):
+        if not root:
+            return
+
         try:
             childCount = root.childCount
         except:
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 53669edf8..984da4fac 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -210,6 +210,9 @@ class Utilities(script_utilities.Utilities):
         self._text = {}
 
     def isDocument(self, obj):
+        if not obj:
+            return False
+
         roles = [pyatspi.ROLE_DOCUMENT_FRAME, pyatspi.ROLE_DOCUMENT_WEB, pyatspi.ROLE_EMBEDDED]
 
         try:


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