From d2e4a230c882e200292c42dea9cac160276f7c0c Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 13 Dec 2005 21:26:31 +0000 Subject: [PATCH] don't crash if we open a pm after he left the room --- src/gajim.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gajim.py b/src/gajim.py index 10b4e243b..beeb5dc30 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -1283,7 +1283,10 @@ class Interface: w = wins['chats'][jid] else: room_jid, nick = jid.split('/', 1) - show = gajim.gc_contacts[account][room_jid][nick].show + if gajim.gc_contacts[account][room_jid].has_key(nick): + show = gajim.gc_contacts[account][room_jid][nick].show + else: + show = 'offline': c = Contact(jid = jid, name = nick, groups = ['none'], show = show, ask = 'none') self.roster.new_chat(c, account)