From 7c99b826420475c0f5cffc3479bcc80bdf309a6c Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 29 Jun 2015 23:28:39 +0200 Subject: Fix a traceback in the OTR plugin --- plugins/otr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/otr.py b/plugins/otr.py index cceadb99..cef6d7d4 100644 --- a/plugins/otr.py +++ b/plugins/otr.py @@ -824,7 +824,8 @@ class Plugin(BasePlugin): context.disconnect() if isinstance(tab, DynamicConversationTab) and not tab.locked_resource: ctx = self.find_encrypted_context_with_matching(safeJID(name).bare) - ctx.disconnect() + if ctx is not None: + ctx.disconnect() elif action == 'start' or action == 'refresh': self.otr_start(tab, name, format_dict) elif action == 'ourfpr': -- cgit v1.2.3