]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add failure condition
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 13 May 2010 15:22:21 +0000 (10:22 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 13 May 2010 19:49:36 +0000 (14:49 -0500)
src/switch_core_io.c

index b20ea0c4e97f18faf2bfbb2ce01f5adb415e32f7..7d75835ac8c59889207b491565495d7c8f1376fb 100644 (file)
@@ -639,6 +639,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
        switch_mutex_lock(session->write_codec->mutex);
        switch_mutex_lock(frame->codec->mutex);
 
+       if (!frame->codec->implementation || !session->write_codec->implementation) goto error;
+       
        if ((session->write_codec && frame->codec && session->write_codec->implementation != frame->codec->implementation)) {
                if (session->write_impl.codec_id == frame->codec->implementation->codec_id ||
                        session->write_impl.microseconds_per_packet != frame->codec->implementation->microseconds_per_packet) {