prevent traceback when closing chat control without jingle enabled. Fixes #5544

This commit is contained in:
Yann Leboulanger 2010-01-06 23:15:35 +01:00
parent 95137bae06
commit e8b88db629
1 changed files with 4 additions and 1 deletions

View File

@ -1846,8 +1846,11 @@ class ChatControl(ChatControlBase):
banner_name_label.set_tooltip_text(label_tooltip) banner_name_label.set_tooltip_text(label_tooltip)
def close_jingle_content(self, jingle_type): def close_jingle_content(self, jingle_type):
sid = getattr(self, jingle_type + '_sid')
if not sid:
return
session = gajim.connections[self.account].get_jingle_session( session = gajim.connections[self.account].get_jingle_session(
self.contact.get_full_jid(), getattr(self, jingle_type + '_sid')) self.contact.get_full_jid(), sid)
if session: if session:
content = session.get_content(jingle_type) content = session.get_content(jingle_type)
if content: if content: