Add check if the handler exists.
This commit is contained in:
parent
b4a80d771a
commit
0aaac62e64
1 changed files with 2 additions and 2 deletions
4
feed.go
4
feed.go
|
@ -181,12 +181,12 @@ func (this *Feed) notifyListeners() {
|
|||
newitems = append(newitems, item)
|
||||
}
|
||||
}
|
||||
if len(newitems) > 0 {
|
||||
if len(newitems) > 0 && this.itemhandler != nil {
|
||||
this.itemhandler(this, channel, newitems)
|
||||
}
|
||||
}
|
||||
|
||||
if len(newchannels) > 0 {
|
||||
if len(newchannels) > 0 && this.chanhandler != nil {
|
||||
this.chanhandler(this, newchannels)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue