File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -344,7 +344,11 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult) result
344
344
NSString * peerConnectionId = argsMap[@" peerConnectionId" ];
345
345
NSDictionary * candMap = argsMap[@" candidate" ];
346
346
NSString *sdp = candMap[@" candidate" ];
347
- int sdpMLineIndex = ((NSNumber *)candMap[@" sdpMLineIndex" ]).intValue ;
347
+ id sdpMLineIndexValue = candMap[@" sdpMLineIndex" ];
348
+ int sdpMLineIndex = 0 ;
349
+ if (![sdpMLineIndexValue isKindOfClass: [NSNull class ]]) {
350
+ sdpMLineIndex = ((NSNumber *)candMap[@" sdpMLineIndex" ]).intValue ;
351
+ }
348
352
NSString *sdpMid = candMap[@" sdpMid" ];
349
353
350
354
RTCIceCandidate* candidate = [[RTCIceCandidate alloc ] initWithSdp: sdp sdpMLineIndex: sdpMLineIndex sdpMid: sdpMid];
You can’t perform that action at this time.
0 commit comments