Merge pull request #116 from int3l/master

Prevent nil pointer dereference
This commit is contained in:
Thomas Jager 2019-03-24 15:35:21 +01:00 committed by GitHub
commit 139f940005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
irc.go

@ -78,9 +78,8 @@ func (irc *Connection) readLoop() {
irc.lastMessage = time.Now()
irc.lastMessageMutex.Unlock()
event, err := parseToEvent(msg)
event.Connection = irc
if err == nil {
/* XXX: len(args) == 0: args should be empty */
event.Connection = irc
irc.RunCallbacks(event)
}
}