From f640d62ac049e9c29bc3a65f5131e40e7f8ad1f3 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Thu, 18 Aug 2005 12:59:54 +0000 Subject: [PATCH] prevent a tb but add a fixme because I am not sure why it happens --- src/chat.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/chat.py b/src/chat.py index 66dc3ad06..5546b8cb4 100644 --- a/src/chat.py +++ b/src/chat.py @@ -126,14 +126,17 @@ class Chat: elif len(self.xmls) == 1: # just one tab if self.widget_name == 'tabbed_chat_window': c = gajim.get_first_contact_instance_from_jid(self.account, jid) - add = c.name + if c is None: # FIXME: I don't know why but c can be None! + add = '' + else: + add = c.name elif self.widget_name == 'groupchat_window': name = gajim.get_nick_from_jid(jid) add = name title = start + add if len(gajim.connections) >= 2: # if we have 2 or more accounts - title = title + ' (' + _('account: ') + self.account + ')' + title += ' (' + _('account: ') + self.account + ')' self.window.set_title(title)