From c8d808d956898c7e4ac721e043825f64666e26ed Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Thu, 28 Jun 2007 21:22:27 +0000
Subject: [PATCH] fix TB when we remove an account. Fixes #3268

---
 src/gajim.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/gajim.py b/src/gajim.py
index d0fcf0c7b2..d8d756412d 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -482,8 +482,11 @@ class Interface:
 			model[self.roster.status_message_menuitem_iter][3] = True
 
 		# Inform all controls for this account of the connection state change
-		for ctrl in self.msg_win_mgr.get_controls() + \
-		self.minimized_controls[account].values():
+		ctrls = self.msg_win_mgr.get_controls()
+		if self.minimized_controls.has_key(account):
+			# Can not be the case when we remove account
+			ctrls += self.minimized_controls[account].values()
+		for ctrl in ctrls:
 			if ctrl.account == account:
 				if status == 'offline' or (status == 'invisible' and \
 				gajim.connections[account].is_zeroconf):
-- 
GitLab