From 9082b4df48ef127cc16e32edcb0cfd9fc05c9a46 Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Fri, 3 Aug 2012 03:28:32 +0200 Subject: [PATCH] keyboard: _showLayoutItem is only defined if allowSettings. Check Main.sessionMode.allowSettings is true before accessing the actor item of _showLayoutItem. https://bugzilla.gnome.org/show_bug.cgi?id=681101 --- js/ui/status/keyboard.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index 4a3fdc704..900c81cd8 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js @@ -178,7 +178,9 @@ const InputSourceIndicator = new Lang.Class({ }, setLockedState: function(locked) { - this._showLayoutItem.actor.visible = !locked; + if (Main.sessionMode.allowSettings) { + this._showLayoutItem.actor.visible = !locked; + } this.menu.setSettingsVisibility(!locked); },