From d69d5266b55c7eda2fd686c13018c67eb21d4076 Mon Sep 17 00:00:00 2001 From: js Date: Sun, 11 May 2008 01:07:38 +0000 Subject: [PATCH] Fix a OTR related crash on exit. --- src/gajim.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index e5007c68a..d925b0e09 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -327,8 +327,12 @@ class OtrlMessageAppOps: dialog.set_response_sensitive(gtk.RESPONSE_CLOSE, True) def is_logged_in(self, opdata={}, accountname="", protocol="", recipient=""): - return gajim.contacts.get_contact_from_full_jid(opdata['account'], recipient).show \ - in ['dnd', 'xa', 'chat', 'online', 'away', 'invisible'] + contact = gajim.contacts.get_contact_from_full_jid(opdata['account'], recipient) + if contact: + return contact.show \ + in ['dnd', 'xa', 'chat', 'online', 'away', + 'invisible'] + return 0 def inject_message(self, opdata=None, accountname="", protocol="", recipient="", message=""):