From 1e621ee133867727e76c2aa03bdbad2dbbd136b1 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Sun, 3 Apr 2016 02:04:52 -0400 Subject: [PATCH] Fix issue when module is loaded with invalid item causing crash due to no item being available (incorrect logic) --- eos/effectHandlerHelpers.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/eos/effectHandlerHelpers.py b/eos/effectHandlerHelpers.py index 7f19c4382..75b51715d 100644 --- a/eos/effectHandlerHelpers.py +++ b/eos/effectHandlerHelpers.py @@ -131,14 +131,15 @@ class HandledModuleList(HandledList): self.remove(mod) return - # fix for #529, where a module may be in incorrect state after CCP changes mechanics of module - if not mod.isValidState(mod.state): - mod.state = eos.types.State.ONLINE - mod.position = len(self) HandledList.append(self, mod) if mod.isInvalid: self.remove(mod) + return + + # fix for #529, where a module may be in incorrect state after CCP changes mechanics of module + if not mod.isValidState(mod.state): + mod.state = eos.types.State.ONLINE def insert(self, index, mod): mod.position = index