diff options
author | Chia-chi Yeh <chiachi@android.com> | 2012-03-27 15:27:25 -0700 |
---|---|---|
committer | Chia-chi Yeh <chiachi@android.com> | 2012-03-27 15:27:25 -0700 |
commit | a7857fbfdfccacb95306e32511f57f1a017b0e31 (patch) | |
tree | d88f8e66a89d46121cd091bfef65f0ef1d8cc665 | |
parent | 36c9401016bf2892334a0cf4119a75dee45baa72 (diff) | |
download | voip-a7857fbfdfccacb95306e32511f57f1a017b0e31.tar.gz |
RTP: add a null-check in AudioStream.setDtmfType().
Change-Id: I52cbdea48affae3747942940451f4fd5ca47030f
-rw-r--r-- | java/android/net/rtp/AudioStream.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/android/net/rtp/AudioStream.java b/java/android/net/rtp/AudioStream.java index d761214..b7874f7 100644 --- a/java/android/net/rtp/AudioStream.java +++ b/java/android/net/rtp/AudioStream.java @@ -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"); } } |