Do not crash on ship w/o labels and w/o slots

This commit is contained in:
DarkPhoenix
2020-07-29 09:02:46 +03:00
parent 93ae9e0891
commit f91e0b2e23

View File

@@ -562,7 +562,10 @@ class FittingView(d.Display):
if sFit.serviceFittingOptions["rackSlots"]:
# flag to know when to add blanks, based on previous slot
slotDivider = None if sFit.serviceFittingOptions["rackLabels"] else self.mods[0].slot
if sFit.serviceFittingOptions["rackLabels"] or len(self.mods) == 0:
slotDivider = None
else:
slotDivider = self.mods[0].slot
# first loop finds where slot dividers must go before modifying self.mods
for i, mod in enumerate(self.mods):