From b9cb37da5eacd7fed76261a9295c189aba6e0ab9 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Tue, 22 Feb 2011 20:56:23 +0100 Subject: [PATCH] PopupMenuManager: don't throw exceptions if don't have focus stage.key_focus can be null, but passing null to _activeMenuContains throws (from gjs marshalling). In that case, just assume it returned false. https://bugzilla.gnome.org/show_bug.cgi?id=642976 --- js/ui/popupMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 0a26ba71e..99199224c 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -1252,7 +1252,7 @@ PopupMenuManager.prototype = { menu.sourceActor.grab_key_focus(); } else if (menu == this._activeMenu) { let focus = global.stage.key_focus; - let fromActive = this._activeMenuContains(focus); + let fromActive = focus && this._activeMenuContains(focus); if (this.grabbed) this._ungrab();