Skip to content

Commit

Permalink
account for nil struct
Browse files Browse the repository at this point in the history
  • Loading branch information
nikooo777 committed Aug 11, 2022
1 parent d93f463 commit 9d93799
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion downloader/ytdl/Video.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (v *YtdlVideo) GetUploadTime() time.Time {
mortyRelease, err := sdk.GetAPIsConfigs().GetReleasedDate(v.ID)
if err != nil {
logrus.Error(err)
} else if mortyRelease.ReleaseTime != "" {
} else if mortyRelease != nil {
mortyReleaseTimestamp, err = time.ParseInLocation(time.RFC3339, mortyRelease.ReleaseTime, time.UTC)
if err != nil {
logrus.Error(err)
Expand Down

0 comments on commit 9d93799

Please sign in to comment.