[orca] Make sure we have an event before checking its type
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Make sure we have an event before checking its type
- Date: Mon, 25 Apr 2022 10:43:30 +0000 (UTC)
commit a93403e591995e6b7a86e968549a18514e70ae40
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Apr 25 12:43:00 2022 +0200
Make sure we have an event before checking its type
src/orca/scripts/apps/gnome-shell/script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/apps/gnome-shell/script.py b/src/orca/scripts/apps/gnome-shell/script.py
index f7922dfde..7e086238f 100644
--- a/src/orca/scripts/apps/gnome-shell/script.py
+++ b/src/orca/scripts/apps/gnome-shell/script.py
@@ -75,7 +75,7 @@ class Script(clutter.Script):
return clutter.Script.skipObjectEvent(self, event)
def locusOfFocusChanged(self, event, oldFocus, newFocus):
- if (event.type == "window:activate" and newFocus and not newFocus.name):
+ if (event and event.type == "window:activate" and newFocus and not newFocus.name):
if self._getQueuedEvent("object:state-changed:focused", True):
msg = "GNOME SHELL: Have matching focused event. Not announcing nameless window."
debug.println(debug.LEVEL_INFO, msg, True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]