UserMenu: fix disconnecting a signal that was never connected
If a disabled account is removed, we receive account-removed without ever seeing account-enabled, and thus _changingId is undefined. https://bugzilla.gnome.org/show_bug.cgi?id=681382
This commit is contained in:
parent
aa30c6a323
commit
355ec9ceca
@ -654,8 +654,10 @@ const UserMenuButton = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onAccountRemoved: function(accountMgr, account) {
|
_onAccountRemoved: function(accountMgr, account) {
|
||||||
account.disconnect(account._changingId);
|
if (account._changingId) {
|
||||||
account._changingId = 0;
|
account.disconnect(account._changingId);
|
||||||
|
account._changingId = 0;
|
||||||
|
}
|
||||||
this._updateChangingPresence();
|
this._updateChangingPresence();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user