Add missing respondsToSelector call for new optional delegate method.
Without checking respondsToSelector, clients that don't implement the optional delegate method will crash. Bug: webrtc:13446 Change-Id: I3b06b15e818ca80e6afae9491c30f38c6b262eb2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242600 Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Auto-Submit: Chuck Hays <haysc@webrtc.org> Commit-Queue: Chuck Hays <haysc@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35573}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
01ae9dcf0e
commit
0a3836a882
@ -239,7 +239,10 @@ void PeerConnectionDelegateAdapter::OnIceCandidateError(const std::string &addre
|
||||
url:url
|
||||
errorCode:error_code
|
||||
errorText:error_text];
|
||||
[peer_connection.delegate peerConnection:peer_connection didFailToGatherIceCandidate:event];
|
||||
if ([peer_connection.delegate respondsToSelector:@selector(peerConnection:
|
||||
didFailToGatherIceCandidate:)]) {
|
||||
[peer_connection.delegate peerConnection:peer_connection didFailToGatherIceCandidate:event];
|
||||
}
|
||||
}
|
||||
|
||||
void PeerConnectionDelegateAdapter::OnIceCandidatesRemoved(
|
||||
|
||||
Reference in New Issue
Block a user