Fix a OTR related crash on exit.

This commit is contained in:
js 2008-05-11 01:07:38 +00:00
parent b5a9edc6b4
commit d69d5266b5
1 changed files with 6 additions and 2 deletions

View File

@ -327,8 +327,12 @@ class OtrlMessageAppOps:
dialog.set_response_sensitive(gtk.RESPONSE_CLOSE, True) dialog.set_response_sensitive(gtk.RESPONSE_CLOSE, True)
def is_logged_in(self, opdata={}, accountname="", protocol="", recipient=""): def is_logged_in(self, opdata={}, accountname="", protocol="", recipient=""):
return gajim.contacts.get_contact_from_full_jid(opdata['account'], recipient).show \ contact = gajim.contacts.get_contact_from_full_jid(opdata['account'], recipient)
in ['dnd', 'xa', 'chat', 'online', 'away', 'invisible'] if contact:
return contact.show \
in ['dnd', 'xa', 'chat', 'online', 'away',
'invisible']
return 0
def inject_message(self, opdata=None, accountname="", protocol="", recipient="", def inject_message(self, opdata=None, accountname="", protocol="", recipient="",
message=""): message=""):