[orca] Handle another case of objects going defunct on us



commit 5afbe71cb6dfd1eeaeafec31d6b523675155bf5f
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Jul 16 12:08:42 2019 -0400

    Handle another case of objects going defunct on us

 src/orca/mouse_review.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/mouse_review.py b/src/orca/mouse_review.py
index b0ff19056..943d9a209 100644
--- a/src/orca/mouse_review.py
+++ b/src/orca/mouse_review.py
@@ -478,7 +478,9 @@ class MouseReviewer:
             return
 
         isMenu = lambda x: x and x.getRole() == pyatspi.ROLE_MENU
-        if isMenu(orca_state.locusOfFocus):
+        if script.utilities.isDead(orca_state.locusOfFocus):
+            menu = None
+        elif isMenu(orca_state.locusOfFocus):
             menu = orca_state.locusOfFocus
         else:
             try:


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