[orca] Be sure we have an app at all before we see if that app is dead



commit 027c04d154282c25de888884327a60752a37fd3e
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Apr 4 17:39:27 2012 -0400

    Be sure we have an app at all before we see if that app is dead

 src/orca/event_manager.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index be8e675..2021563 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -393,7 +393,7 @@ class EventManager:
         script = None
         try:
             app = event.host_application or event.source.getApplication()
-            if app.getState().contains(pyatspi.STATE_DEFUNCT):
+            if app and app.getState().contains(pyatspi.STATE_DEFUNCT):
                 msg = 'WARNING: App is defunct. Cannot get script for event.'
                 debug.println(debug.LEVEL_WARNING, msg)
                 return None



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