]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
CID:1024241: clean up null checking on var that can never be null anyways
authorMichael Jerris <mike@jerris.com>
Wed, 22 Apr 2015 15:10:32 +0000 (10:10 -0500)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:23 +0000 (12:47 -0500)
src/switch_core_media.c

index a5672dd21d0b80546aaee731a0530a486f20b3d3..068151bd71a4d2d8b5e14a71d2743f5931b3357b 100644 (file)
@@ -431,6 +431,8 @@ static switch_t38_options_t * switch_core_media_process_udptl(switch_core_sessio
        switch_t38_options_t *t38_options = switch_channel_get_private(session->channel, "t38_options");
        sdp_attribute_t *attr;
 
+       switch_assert(sdp);
+       
        if (!t38_options) {
                t38_options = switch_core_session_alloc(session, sizeof(switch_t38_options_t));
 
@@ -453,7 +455,7 @@ static switch_t38_options_t * switch_core_media_process_udptl(switch_core_sessio
        
        if (m->m_connections && m->m_connections->c_address) {
                t38_options->remote_ip = switch_core_session_strdup(session, m->m_connections->c_address);
-       } else if (sdp && sdp->sdp_connection && sdp->sdp_connection->c_address) {
+       } else if (sdp->sdp_connection && sdp->sdp_connection->c_address) {
                t38_options->remote_ip = switch_core_session_strdup(session, sdp->sdp_connection->c_address);
        }