Skip to content

Commit fb982db

Browse files
author
Chia-chi Yeh
committed
RTP: add a null-check in AudioStream.setDtmfType().
Change-Id: I52cbdea48affae3747942940451f4fd5ca47030f
1 parent 80e4ee4 commit fb982db

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)