From fef38bc53feceabf925e659b2dcc89b9c7bf0ca3 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Thu, 15 Apr 2021 12:07:05 +0200 Subject: [PATCH] Protect against requesting when no group is joined. Thanks to gregfr. --- rtpconn/webclient.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rtpconn/webclient.go b/rtpconn/webclient.go index 54b9086..a1a51dd 100644 --- a/rtpconn/webclient.go +++ b/rtpconn/webclient.go @@ -678,6 +678,9 @@ func gotICE(c *webClient, candidate *webrtc.ICECandidateInit, id string) error { } func (c *webClient) setRequested(requested map[string]uint32) error { + if c.group == nil { + return errors.New("attempted to request with no group joined") + } c.requested = requested pushConns(c, c.group)