Fix panic for HomeKit source

This commit is contained in:
Alexey Khit
2023-09-10 16:10:00 +03:00
parent 863f8ec19b
commit daa2522a52
+2 -2
View File
@@ -175,10 +175,10 @@ func (c *Client) Start() error {
func (c *Client) Stop() error {
_ = c.SuperProducer.Close()
if c.videoSession != nil {
if c.videoSession != nil && c.videoSession.Remote != nil {
c.srtp.DelSession(c.videoSession)
}
if c.audioSession != nil {
if c.audioSession != nil && c.audioSession.Remote != nil {
c.srtp.DelSession(c.audioSession)
}