status/keyboard: Check if this._currentSource is valid on activation
this._currentSource might be invalid so check for that to prevent an exception and still switch to the newly activated source. https://bugzilla.gnome.org/show_bug.cgi?id=695841
This commit is contained in:
parent
5c89568cca
commit
01deb9ef7d
@ -487,7 +487,7 @@ const InputSourceIndicator = new Lang.Class({
|
||||
let is = new InputSource(type, id, displayName, shortName, i);
|
||||
|
||||
is.connect('activate', Lang.bind(this, function() {
|
||||
if (this._currentSource.index == is.index)
|
||||
if (this._currentSource && this._currentSource.index == is.index)
|
||||
return;
|
||||
this._settings.set_value(KEY_CURRENT_INPUT_SOURCE,
|
||||
GLib.Variant.new_uint32(is.index));
|
||||
|
Loading…
Reference in New Issue
Block a user