Skip to content

Commit b104921

Browse files
Chia-chi YehAndroid (Google) Code Review
authored andcommitted
Merge "RTP: add a null-check in AudioStream.setDtmfType()."
2 parents 5b8fd25 + fb982db commit b104921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

voip/java/android/net/rtp/AudioStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public void setDtmfType(int type) {
158158
if (type < 96 || type > 127) {
159159
throw new IllegalArgumentException("Invalid type");
160160
}
161-
if (type == mCodec.type) {
161+
if (mCodec != null && type == mCodec.type) {
162162
throw new IllegalArgumentException("The type is used by codec");
163163
}
164164
}

0 commit comments

Comments
 (0)