Index: talk/app/webrtc/objc/RTCPeerConnection.mm |
diff --git a/talk/app/webrtc/objc/RTCPeerConnection.mm b/talk/app/webrtc/objc/RTCPeerConnection.mm |
index da092c80269b6c378bdb2aaf6f0a726bf70d7aa8..2491cf7c97bc1b0f74eb0b4a8ae4b349bd8606e2 100644 |
--- a/talk/app/webrtc/objc/RTCPeerConnection.mm |
+++ b/talk/app/webrtc/objc/RTCPeerConnection.mm |
@@ -211,8 +211,12 @@ class RTCStatsObserver : public StatsObserver { |
} |
- (BOOL)setConfiguration:(RTCConfiguration *)configuration { |
- return self.peerConnection->SetConfiguration( |
- configuration.nativeConfiguration); |
+ std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> config( |
+ [configuration createNativeConfiguration]); |
+ if (!config) { |
+ return NO; |
+ } |
+ return self.peerConnection->SetConfiguration(*config); |
} |
- (RTCSessionDescription*)localDescription { |