Check if there is actually a title

Don't segfault
master
2577 3 years ago
parent d22fb925c9
commit a28db052a5
  1. 2
      feed.go

@ -263,7 +263,7 @@ func getTitle(url string) string {
}
func traverse(n *html.Node) (string, bool) {
if isTitleElement(n) {
if isTitleElement(n) && n.FirstChild != nil {
return n.FirstChild.Data, true
}

Loading…
Cancel
Save