Avoid NullPointerException when addCandidate #105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Set sdpMid value to an empty string replacing null for avoiding NullPointerException:
W/System.err(10024): java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.lang.String)' on a null object reference
W/System.err(10024): at org.webrtc.JniHelper.getStringBytes(JniHelper.java:25)
W/System.err(10024): at org.webrtc.PeerConnection.nativeAddIceCandidate(Native Method)
W/System.err(10024): at org.webrtc.PeerConnection.addIceCandidate(PeerConnection.java:896)
W/System.err(10024): at com.cloudwebrtc.webrtc.MethodCallHandlerImpl.peerConnectionAddICECandidate(MethodCallHandlerImpl.java:1432)
W/System.err(10024): at com.cloudwebrtc.webrtc.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:290)
W/System.err(10024): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
W/System.err(10024): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
W/System.err(10024): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
W/System.err(10024): at android.os.MessageQueue.nativePollOnce(Native Method)
W/System.err(10024): at android.os.MessageQueue.next(MessageQueue.java:325)
W/System.err(10024): at android.os.Looper.loop(Looper.java:142)
W/System.err(10024): at android.app.ActivityThread.main(ActivityThread.java:6574)
W/System.err(10024): at java.lang.reflect.Method.invoke(Native Method)
W/System.err(10024): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
W/System.err(10024): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
E/rtc (10024):
E/rtc (10024):
E/rtc (10024): #
E/rtc (10024): # Fatal error in: gen/sdk/android/generated_metrics_jni/../../../../../../../../usr/local/google/home/sakal/code/webrtc-aar-release/src/sdk/android/src/jni/jni_generator_helper.h, line 94
E/rtc (10024): # last system error: 0
E/rtc (10024): # Check failed: !env->ExceptionCheck()
E/rtc (10024): #
F/libc (10024): Fatal signal 6 (SIGABRT), code -6 in tid 10024 (ple.flutter_prj), pid 10024 (ple.flutter_prj)
Description
Reference issue
Fixes #...