From e8b88db62987f5096f6a1ff97ec9fc71d06f92dd Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 6 Jan 2010 23:15:35 +0100 Subject: [PATCH] prevent traceback when closing chat control without jingle enabled. Fixes #5544 --- src/chat_control.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/chat_control.py b/src/chat_control.py index 6dd336544..bd0f1e89d 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -1846,8 +1846,11 @@ class ChatControl(ChatControlBase): banner_name_label.set_tooltip_text(label_tooltip) 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( - self.contact.get_full_jid(), getattr(self, jingle_type + '_sid')) + self.contact.get_full_jid(), sid) if session: content = session.get_content(jingle_type) if content: