Add missing null checks (#661)

This commit is contained in:
Nick 2023-07-21 19:34:52 -04:00 committed by GitHub
commit c748ad8bcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -292,10 +292,10 @@ namespace NewHorizons
var system = new StarSystemConfig() var system = new StarSystemConfig()
{ {
entryPositions = entryPositions entryPositions = entryPositions?
.Select((pair) => new EntryPositionInfo() { id = pair.Key, position = pair.Value }) .Select((pair) => new EntryPositionInfo() { id = pair.Key, position = pair.Value })
.ToArray(), .ToArray(),
curiosities = curiousityColours curiosities = curiousityColours?
.Select((pair) => new CuriosityColorInfo() { id = pair.Key, color = MColor.FromColor(pair.Value.colour), highlightColor = MColor.FromColor(pair.Value.highlight) }) .Select((pair) => new CuriosityColorInfo() { id = pair.Key, color = MColor.FromColor(pair.Value.colour), highlightColor = MColor.FromColor(pair.Value.highlight) })
.ToArray() .ToArray()
}; };