Fix nil dereference bug in entry checkAuthors
This commit is contained in:
parent
97fe20f364
commit
2ef8d8c9df
3
entry.go
3
entry.go
@ -36,6 +36,9 @@ type Entry struct {
|
|||||||
// atom:author element itself.
|
// atom:author element itself.
|
||||||
func (e *Entry) checkAuthors() error {
|
func (e *Entry) checkAuthors() error {
|
||||||
if e.Authors == nil {
|
if e.Authors == nil {
|
||||||
|
if e.Source == nil {
|
||||||
|
return errors.New("no authors set in entry")
|
||||||
|
}
|
||||||
if e.Source.Authors == nil {
|
if e.Source.Authors == nil {
|
||||||
return errors.New("no authors set in entry")
|
return errors.New("no authors set in entry")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user