account for nil struct
This commit is contained in:
parent
d93f463386
commit
9d93799d86
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue