Skip to content

Commit

Permalink
ensure lastStatusJSON isnt nil
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiet480 committed Sep 16, 2018
1 parent a8b40cd commit 25a4493
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/guideproviders/schedules_direct.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func (s *SchedulesDirect) Refresh(lastStatusJSON *json.RawMessage) ([]byte, erro

lineupsMetadataMap := make(map[string]schedulesdirect.Lineup)
var lastStatus schedulesdirect.StatusResponse
if len(*lastStatusJSON) > 0 {
if lastStatusJSON != nil && len(*lastStatusJSON) > 0 {
if unmarshalErr := json.Unmarshal(*lastStatusJSON, &lastStatus); unmarshalErr != nil {
return nil, fmt.Errorf("error unmarshalling cached status JSON: %s", unmarshalErr)
}
Expand Down

0 comments on commit 25a4493

Please sign in to comment.