[orca] Be sure we have an event before getting its properties



commit ec4e2eb6e827929d3296b55727307ea55fe59be4
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Fri Jan 31 13:42:40 2020 -0500

    Be sure we have an event before getting its properties

 src/orca/scripts/web/script_utilities.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 796d88b50..49834b987 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -4021,7 +4021,7 @@ class Utilities(script_utilities.Utilities):
         return False
 
     def caretMovedToSamePageFragment(self, event, oldFocus=None):
-        if not event.type.startswith("object:text-caret-moved"):
+        if not (event and event.type.startswith("object:text-caret-moved")):
             return False
 
         if event.source.getState().contains(pyatspi.STATE_EDITABLE):


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