8000 fix: null check for trackId. · myname-caoben/flutter-webrtc@2586a61 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2586a61

Browse files
committed
fix: null check for trackId.
1 parent da4cd2c commit 2586a61

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

android/src/main/java/com/cloudwebrtc/webrtc/MethodCallHandlerImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,9 @@ public void onMethodCall(MethodCall call, @NonNull Result notSafeResult) {
446446
} else {
447447
stream = getStreamForId(streamId, ownerTag);
448448
}
449-
if (!trackId.equals("0")){
450-
render.setStream(stream,trackId);
451-
}else {
449+
if (trackId != null && !trackId.equals("0")){
450+
render.setStream(stream, trackId);
451+
} else {
452452
render.setStream(stream);
453453
}
454454
result.success(null);

0 commit comments

Comments
 (0)
0