Check if the char is in station before printing the station name

This commit is contained in:
Thomas Schwery 2017-02-08 07:59:30 +01:00
parent 1b601f2141
commit c76fbc32a2

View file

@ -258,9 +258,14 @@ func printCharacterInformation(swaggerclient *ESI.App, m *Character) {
universeNames := getUniverseNames(swaggerclient, &itemIds)
stationName := ""
if position.StationID != nil {
stationName = universeNames[*position.StationID]
}
fmt.Printf("Currently in %s - %s\n",
universeNames[*position.SolarSystemID],
universeNames[*position.StationID],
stationName,
)
}