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
This commit is contained in:
Alban Browaeys 2012-08-03 03:28:32 +02:00 committed by Giovanni Campagna
parent c3179583c3
commit 9082b4df48

View File

@ -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);
},