gc: last selected contact can be in a closed room, so prevent KeyError tb

This commit is contained in:
Nikos Kouremenos 2005-11-22 16:39:48 +00:00
parent 8fd42ee7d8
commit 1e2e0d4de2
1 changed files with 3 additions and 1 deletions

View File

@ -1339,7 +1339,9 @@ current room topic.') % command, room_jid)
if self._last_selected_contact is not None:
# update unselected row
room_jid, nick = self._last_selected_contact
self.draw_contact(room_jid, nick)
# last selected can be in a closed room, so prevent KeyError
if room_jid in self.list_treeview.keys():
self.draw_contact(room_jid, nick)
if selected_iter is None:
self._last_selected_contact = None
return