From 355ec9ceca6ef15f72bedf854c8c00a382ff09b8 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Tue, 7 Aug 2012 16:33:02 +0200 Subject: [PATCH] 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 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js index 7f8d544de..9522134d0 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(); },