]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] Fix crash while writing text_frame in conference
authorsurendrasignalwire <56929670+surendrasignalwire@users.noreply.github.com>
Thu, 9 Jul 2020 21:26:42 +0000 (02:56 +0530)
committerAndrey Volk <andywolk@gmail.com>
Tue, 16 Mar 2021 19:12:33 +0000 (22:12 +0300)
src/switch_core_media.c

index 810306a91dbd339685dc10801fcd3dccd4cbfc9b..674c5b92f989a10c10f6f0936065fed91f8b9703 100644 (file)
@@ -15502,6 +15502,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_text_frame(switch_core
 
        t_engine = &smh->engines[SWITCH_MEDIA_TYPE_TEXT];
 
+       if (!t_engine || !t_engine->tf) {
+               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "text engine not available for processing\n");
+               switch_goto_status(SWITCH_STATUS_BREAK, done);
+       }
+
        if (!is_msrp && switch_channel_test_cap(session->channel, CC_RTP_RTT)) {
 
                if (frame) {