summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-06-29 23:28:39 +0200
committermathieui <mathieui@mathieui.net>2015-06-29 23:28:39 +0200
commit7c99b826420475c0f5cffc3479bcc80bdf309a6c (patch)
tree227ca24ef5a307c27f29d82462f41c086761ce8c /plugins
parent3b0cddd36801703d67ab1d9a2405ad9afc5431a4 (diff)
downloadpoezio-7c99b826420475c0f5cffc3479bcc80bdf309a6c.tar.gz
poezio-7c99b826420475c0f5cffc3479bcc80bdf309a6c.tar.bz2
poezio-7c99b826420475c0f5cffc3479bcc80bdf309a6c.tar.xz
poezio-7c99b826420475c0f5cffc3479bcc80bdf309a6c.zip
Fix a traceback in the OTR plugin
Diffstat (limited to 'plugins')
-rw-r--r--plugins/otr.py3
1 files changed, 2 insertions, 1 deletions
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':