Fix a traceback in the OTR plugin

This commit is contained in:
mathieui 2015-06-29 23:28:39 +02:00
parent 3b0cddd368
commit 7c99b82642
No known key found for this signature in database
GPG key ID: C59F84CEEFD616E3

View file

@ -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':