Adding protection against a null parent reference. (#26)
Found this via ReadAll on my history. I can now process all my history without error.
This commit is contained in:
parent
5d1489c7c5
commit
deee600a65
1 changed files with 1 additions and 1 deletions
|
|
@ -177,7 +177,7 @@ namespace Observatory.Explorer
|
||||||
|
|
||||||
var results = DefaultCriteria.CheckInterest(scanEvent, SystemBodyHistory, BodySignalHistory, (ExplorerSettings)ExplorerWorker.Settings);
|
var results = DefaultCriteria.CheckInterest(scanEvent, SystemBodyHistory, BodySignalHistory, (ExplorerSettings)ExplorerWorker.Settings);
|
||||||
|
|
||||||
if (BarycentreHistory.ContainsKey(scanEvent.SystemAddress) && BarycentreHistory[scanEvent.SystemAddress].ContainsKey(scanEvent.Parent[0].Body))
|
if (BarycentreHistory.ContainsKey(scanEvent.SystemAddress) && scanEvent.Parent != null && BarycentreHistory[scanEvent.SystemAddress].ContainsKey(scanEvent.Parent[0].Body))
|
||||||
{
|
{
|
||||||
ProcessScan(ConvertBarycentre(BarycentreHistory[scanEvent.SystemAddress][scanEvent.Parent[0].Body], scanEvent), readAll);
|
ProcessScan(ConvertBarycentre(BarycentreHistory[scanEvent.SystemAddress][scanEvent.Parent[0].Body], scanEvent), readAll);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue