]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
switch rtp: check for the channel too
authorMoises Silva <moy@sangoma.com>
Fri, 4 Jun 2010 12:16:51 +0000 (08:16 -0400)
committerMoises Silva <moy@sangoma.com>
Fri, 4 Jun 2010 12:16:51 +0000 (08:16 -0400)
src/switch_rtp.c

index 42c3f51e9d08cb16b0f7b3c39dfffb25eaad6e28..13edd4d330c57ca9b5b3aac79e28a177ed432268 100644 (file)
@@ -1383,7 +1383,9 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
                switch_clear_flag_locked(rtp_session, SWITCH_RTP_FLAG_NOBLOCK);
        }
 
-       switch_channel_set_private(channel, "__rtcp_audio_rtp_session", rtp_session);
+       if (channel) {
+               switch_channel_set_private(channel, "__rtcp_audio_rtp_session", rtp_session);
+       }
 
 #ifdef ENABLE_ZRTP
        if (zrtp_on) {