diff frontends/src/primitivus/contact_list.py @ 646:f7804c52c754

primitivus: disconnected contact crash fix fix IndexError when selecting a contact and hiding disconnected ones fix bug 47
author Goffi <goffi@goffi.org>
date Sun, 22 Sep 2013 01:49:19 +0200
parents 84a6e83157c2
children 0b9bd47dffcd
line wrap: on
line diff
--- a/frontends/src/primitivus/contact_list.py	Sat Sep 21 15:34:10 2013 +0200
+++ b/frontends/src/primitivus/contact_list.py	Sun Sep 22 01:49:19 2013 +0200
@@ -50,7 +50,10 @@
         widget, position = self.frame.body.get_focus()
         self.frame.body = self.__buildList()
         if position:
-            self.frame.body.set_focus(position)
+            try:
+                self.frame.body.set_focus(position)
+            except IndexError:
+                pass
         self.host.redraw()
 
     def update_jid(self, jid):