Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection+DataChannel.mm

Issue 2860353002: When a data channel fails to be created, return nil instead of crashing. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection+DataChannel.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection+DataChannel.mm b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection+DataChannel.mm
index b3825d4e4ebb55ae39bd1dc10853fcb63d683b09..80b510898c078b64de53117b7d216032f08c08f8 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection+DataChannel.mm
+++ b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection+DataChannel.mm
@@ -25,6 +25,9 @@
rtc::scoped_refptr<webrtc::DataChannelInterface> dataChannel =
self.nativePeerConnection->CreateDataChannel(labelString,
&nativeInit);
+ if (!dataChannel) {
+ return nil;
+ }
return [[RTCDataChannel alloc] initWithNativeDataChannel:dataChannel];
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698