summaryrefslogtreecommitdiff
path: root/res/res_pjsip_sdp_rtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_pjsip_sdp_rtp.c')
-rw-r--r--res/res_pjsip_sdp_rtp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index 88b94ee43..20a219e7e 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -1351,7 +1351,7 @@ static int create_outgoing_sdp_stream(struct ast_sip_session *session, struct as
media->desc.port = 0;
media->desc.port_count = 1;
- if (remote) {
+ if (remote && remote->media[ast_stream_get_position(stream)]) {
pjmedia_sdp_media *remote_media = remote->media[ast_stream_get_position(stream)];
int index;