Fix panic on Producer GetMedias

This commit is contained in:
Alexey Khit
2023-05-03 07:57:00 +03:00
parent 95ca5f5fe1
commit c1923627c0
+4
View File
@@ -56,6 +56,10 @@ func (p *Producer) GetMedias() []*core.Media {
p.mu.Lock()
defer p.mu.Unlock()
if p.conn == nil {
return nil
}
return p.conn.GetMedias()
}