Tons of error checking and cleanup

getIconsByMarketGroup() was badly broken. I've added various error checking
routines and fixed a runaway memory allocation freeze in the event that
no icons can be found.

The cause of that problem remains, however. Still working on it.
This commit is contained in:
Corollax
2012-07-25 23:45:14 +03:00
parent 14550de282
commit b343d8b120
2 changed files with 17 additions and 15 deletions

View File

@@ -161,7 +161,10 @@ class MarketTree(wx.TreeCtrl):
if sMkt.marketGroupValidityCheck(childMktGrp) is False:
continue
iconId = self.addImage(sMkt.getIconByMarketGroup(childMktGrp))
childId = self.AppendItem(root, childMktGrp.name, iconId, data=wx.TreeItemData(childMktGrp.ID))
try:
childId = self.AppendItem(root, childMktGrp.name, iconId, data=wx.TreeItemData(childMktGrp.ID))
except:
continue
if sMkt.marketGroupHasTypesCheck(childMktGrp) is False:
self.AppendItem(childId, "dummy")