check for nil envelopes
This commit is contained in:
parent
9a598cc65b
commit
7d72281815
|
@ -1221,6 +1221,10 @@ func (w *Waku) Stop() error {
|
|||
}
|
||||
|
||||
func (w *Waku) OnNewEnvelopes(envelope *protocol.Envelope, msgType common.MessageType) ([]common.EnvelopeError, error) {
|
||||
if envelope == nil {
|
||||
return nil, errors.New("nil envelope error")
|
||||
}
|
||||
|
||||
recvMessage := common.NewReceivedMessage(envelope, msgType)
|
||||
envelopeErrors := make([]common.EnvelopeError, 0)
|
||||
|
||||
|
|
Loading…
Reference in New Issue