Skip to content

Commit a0e7280

Browse files
authored
fix panic in sip (#1539)
1 parent 7fa6b5d commit a0e7280

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

livekit/sip.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,10 +1048,16 @@ func (p *SIPCodec) Validate() error {
10481048
}
10491049

10501050
func (p *SIPDispatchRuleInfo) Upgrade() {
1051+
if p == nil {
1052+
return
1053+
}
10511054
p.Media = p.Media.UpgradeWith(p.MediaEncryption)
10521055
}
10531056

10541057
func (p *CreateSIPParticipantRequest) Upgrade() {
1058+
if p == nil {
1059+
return
1060+
}
10551061
p.Media = p.Media.UpgradeWith(p.MediaEncryption)
10561062
}
10571063

0 commit comments

Comments
 (0)