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:
Giovanni Campagna 2012-08-07 16:33:02 +02:00
parent aa30c6a323
commit 355ec9ceca

View File

@ -654,8 +654,10 @@ const UserMenuButton = new Lang.Class({
},
_onAccountRemoved: function(accountMgr, account) {
account.disconnect(account._changingId);
account._changingId = 0;
if (account._changingId) {
account.disconnect(account._changingId);
account._changingId = 0;
}
this._updateChangingPresence();
},