From faffebb12629a216e4f30f9b4558b372fdb7fc27 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 6 Nov 2024 18:37:08 -0500 Subject: [PATCH] Check for nil --- transport/split/stream_dialer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transport/split/stream_dialer.go b/transport/split/stream_dialer.go index 84d374fa..19aa696c 100644 --- a/transport/split/stream_dialer.go +++ b/transport/split/stream_dialer.go @@ -35,6 +35,9 @@ func NewStreamDialer(dialer transport.StreamDialer, nextSplit SplitIterator) (tr if dialer == nil { return nil, errors.New("argument dialer must not be nil") } + if nextSplit == nil { + return nil, errors.New("argument nextSplit must not be nil") + } return &splitDialer{dialer: dialer, nextSplit: nextSplit}, nil }