Fix a bug where ships without a race icon (like the apotheosis) would make stuff crash

This commit is contained in:
cncfanatics
2010-08-27 12:50:32 +02:00
parent 2a57455653
commit 0e19433788
2 changed files with 3 additions and 3 deletions

2
eos

Submodule eos updated: a5ba6e88b6...193c9473b0

View File

@@ -98,8 +98,8 @@ class MultiSwitch(wx.Notebook):
fit = cFit.getFit(fitID)
self.SetPageText(tab, "%s: %s" % (fit.ship.item.name, fit.name))
bitmap = bitmapLoader.getBitmap("race_%s_small" % fit.ship.item.race, "icons")
imageId = self.imageList.Add(bitmap)
self.SetPageImage(tab, imageId)
if bitmap:
self.SetPageImage(tab, self.imageList.Add(bitmap))
def changeFit(self, event):
selected = self.GetSelection()