wix: workaround a weird bug which crash wix while using empty_avatar, see comments for more information
This commit is contained in:
parent
a96606c96b
commit
d0848f3819
2 changed files with 5 additions and 2 deletions
|
|
@ -114,7 +114,10 @@ class ContactList(wx.SimpleHtmlListBox, QuickContactList):
|
|||
#show[2]==color (or None)
|
||||
show_html = "<font color='%s'>[%s]</font>" % (show[2], show[1]) if show[2] else ""
|
||||
status = self.CM.getAttr(jid,'status') or ''
|
||||
avatar = self.CM.getAttr(jid,'avatar') or IMAGE_DIR+'/empty_avatar.png'
|
||||
avatar = self.CM.getAttr(jid,'avatar') or IMAGE_DIR+'/empty_avatar' #XXX: there is a weird bug here: if the image has an extension (i.e. empty_avatar.png),
|
||||
#WxPython segfault, and it doesn't without nothing. I couldn't reproduce the case with a basic test script, so it need further investigation before reporting it
|
||||
#to WxPython dev. Anyway, the program crash with a segfault, not a python exception, so there is definitely something wrong with WxPython.
|
||||
#The case seems to happen when SimpleHtmlListBox parse the HTML with the <img> tag
|
||||
|
||||
html = """
|
||||
<table border='0'>
|
||||
|
|
@ -150,7 +153,7 @@ class ContactList(wx.SimpleHtmlListBox, QuickContactList):
|
|||
gp_idx = self.Append(self.__presentGroup(group), Group(group))
|
||||
else:
|
||||
gp_idx = indexes[0]
|
||||
|
||||
|
||||
self.Insert(self.__presentItem(contact), gp_idx+1, contact)
|
||||
|
||||
|
||||
|
|
|
|||
BIN
frontends/src/wix/images/empty_avatar
Normal file
BIN
frontends/src/wix/images/empty_avatar
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 384 B |
Loading…
Reference in a new issue