mirror of
https://github.com/livekit/livekit.git
synced 2026-05-14 18:25:24 +00:00
Check for not nil ICECandidatePair (#1253)
GetSelectedICECandidatePair can return nil for the candidate pair if not available even if the error is not nil. Protect against the nil de-reference panic.
This commit is contained in:
@@ -970,7 +970,7 @@ func (t *PCTransport) GetICEConnectionType() types.ICEConnectionType {
|
||||
return unknown
|
||||
}
|
||||
p, err := t.getSelectedPair()
|
||||
if err != nil {
|
||||
if err != nil || p == nil {
|
||||
return unknown
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user