Check relevant character before accessing it

This commit is contained in:
Eduard Urbach 2019-03-11 09:20:12 +09:00
parent f205b5824c
commit 452a340fff

View File

@ -58,12 +58,12 @@ func Get(ctx *aero.Context) string {
for characterID := range characterAppearances { for characterID := range characterAppearances {
relevantCharacter, err := arn.GetCharacter(characterID) relevantCharacter, err := arn.GetCharacter(characterID)
if !relevantCharacter.HasImage() { if err != nil {
color.Red(err.Error())
continue continue
} }
if err != nil { if !relevantCharacter.HasImage() {
color.Red(err.Error())
continue continue
} }