Skip to content

Commit

Permalink
Fix panic for HomeKit source
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Sep 10, 2023
1 parent 863f8ec commit daa2522
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/homekit/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit daa2522

Please sign in to comment.