[gnome-shell] UserMenu: fix disconnecting a signal that was never connected
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] UserMenu: fix disconnecting a signal that was never connected
- Date: Tue, 7 Aug 2012 15:44:34 +0000 (UTC)
commit 355ec9ceca6ef15f72bedf854c8c00a382ff09b8
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Aug 7 16:33:02 2012 +0200
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
js/ui/userMenu.js | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js
index 7f8d544..9522134 100644
--- a/js/ui/userMenu.js
+++ b/js/ui/userMenu.js
@@ -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();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]