Update notification.go

fixed nil pointer / panic
This commit is contained in:
Brad Rydzewski 2014-08-14 10:22:54 -07:00
parent f5d82b5dc6
commit d78ce6dc59

View file

@ -67,6 +67,9 @@ func (n *Notification) Send(context *model.Request) error {
}
// send email notifications
if n.GitHub == nil {
n.GitHub = &github.GitHub{}
}
if err := n.GitHub.Send(context); err != nil {
log.Println(err)
}