Merge "RTP: add a null-check in AudioStream.setDtmfType()."

This commit is contained in:
Chia-chi Yeh
2012-03-27 15:29:53 -07:00
committed by Android (Google) Code Review

View File

@@ -158,7 +158,7 @@ public class AudioStream extends RtpStream {
if (type < 96 || type > 127) {
throw new IllegalArgumentException("Invalid type");
}
if (type == mCodec.type) {
if (mCodec != null && type == mCodec.type) {
throw new IllegalArgumentException("The type is used by codec");
}
}