res_pjsip_sdp_rtp: Add NULL check in add_crypto_to_stream
authorGeorge Joseph <gjoseph@digium.com>
Thu, 14 Dec 2017 20:05:23 +0000 (13:05 -0700)
committerGeorge Joseph <gjoseph@digium.com>
Thu, 14 Dec 2017 20:05:23 +0000 (13:05 -0700)
commit283d2df6809567c3663421e3a95a8ec19c670c6a
treee7848d7f390600deb8afbaa5bf13403c274d60b7
parentec984870b026091ac78dc82b0fae8ca0bcfa64b0
res_pjsip_sdp_rtp: Add NULL check in add_crypto_to_stream

add_crypto_to_stream wasn't checking for a NULL
session->inv_session->neg before calling pjmedia_sdp_neg_get_state.
This was causing a crash if the negotiation hadn't already been
completed and asterisk was compiled with --enable-dev-mode.

Change-Id: I57c6229954a38145da9810fc18657bfcc4d9d0c9
res/res_pjsip_sdp_rtp.c