This commit is contained in:
blitzmann
2018-12-02 16:08:53 -05:00
parent 75e1e48ba8
commit 0297ec47f6

View File

@@ -78,7 +78,7 @@ class FitReplaceModuleCommand(wx.Command):
if self.module.isValidState(State.ACTIVE):
self.module.state = State.ACTIVE
if self.old_module.charge and self.module.isValidCharge(self.old_module.charge):
if self.old_module and self.old_module.charge and self.module.isValidCharge(self.old_module.charge):
self.module.charge = self.old_module.charge
# Then, check states of all modules and change where needed. This will recalc if needed