fix potential crashes

This commit is contained in:
Sven Czarnian
2021-11-24 12:04:25 +01:00
parent 3b767489c3
commit be6fe84d77

View File

@@ -147,6 +147,9 @@ class Node:
self.ArrivalCandidates = {} self.ArrivalCandidates = {}
self.Inbound = inbound self.Inbound = inbound
if None == referenceTime or None == sequencingConfig:
return
# predict the distance to IAF # predict the distance to IAF
timePrediction = (referenceTime - inbound.ReportTime).total_seconds() timePrediction = (referenceTime - inbound.ReportTime).total_seconds()
if 0 != timePrediction and 0 != len(sequencingConfig.ActiveArrivalRunways): if 0 != timePrediction and 0 != len(sequencingConfig.ActiveArrivalRunways):