Merge pull request #116 from int3l/master
Prevent nil pointer dereference
This commit is contained in:
commit
139f940005
3
irc.go
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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user