fix rare crashes
This commit is contained in:
@@ -113,7 +113,7 @@ class RecedingHorizonControl:
|
|||||||
# search from the back to the front to find the last inbound
|
# search from the back to the front to find the last inbound
|
||||||
for i in range(min(self.FreezedIndex, len(self.Windows)), -1, -1):
|
for i in range(min(self.FreezedIndex, len(self.Windows)), -1, -1):
|
||||||
for inbound in self.Windows[i].Inbounds:
|
for inbound in self.Windows[i].Inbounds:
|
||||||
if runway == inbound.PlannedRunway.Name:
|
if None != inbound.PlannedRunway and runway == inbound.PlannedRunway.Name:
|
||||||
return inbound
|
return inbound
|
||||||
|
|
||||||
# no inbound found
|
# no inbound found
|
||||||
@@ -121,7 +121,7 @@ class RecedingHorizonControl:
|
|||||||
|
|
||||||
def optimizationRelevantInbounds(self):
|
def optimizationRelevantInbounds(self):
|
||||||
# no new inbounds
|
# no new inbounds
|
||||||
if len(self.Windows) <= self.FreezedIndex:
|
if len(self.Windows) <= self.FreezedIndex + 1:
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
inbounds = []
|
inbounds = []
|
||||||
|
|||||||
Reference in New Issue
Block a user