From fb982db41060a2914cddb43200f3ee53627f8762 Mon Sep 17 00:00:00 2001 From: Chia-chi Yeh Date: Tue, 27 Mar 2012 15:27:25 -0700 Subject: RTP: add a null-check in AudioStream.setDtmfType(). Change-Id: I52cbdea48affae3747942940451f4fd5ca47030f --- voip/java/android/net/rtp/AudioStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'voip/java') diff --git a/voip/java/android/net/rtp/AudioStream.java b/voip/java/android/net/rtp/AudioStream.java index d761214..b7874f7 100644 --- a/voip/java/android/net/rtp/AudioStream.java +++ b/voip/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"); } } -- cgit v1.1