From cdd3b6f448bbe97b22d53dda7405609a3bd193a4 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Fri, 12 Jul 2019 20:40:57 +0400 Subject: [PATCH] FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_core_media_bug.c --- src/switch_core_media_bug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_core_media_bug.c b/src/switch_core_media_bug.c index 2a473d0c3d..80b6cfc600 100644 --- a/src/switch_core_media_bug.c +++ b/src/switch_core_media_bug.c @@ -69,7 +69,7 @@ static void switch_core_media_bug_destroy(switch_media_bug_t **bug) switch_thread_join(&st, bp->video_bug_thread); } - if (switch_test_flag(bp, SMBF_READ_VIDEO_PATCH) && bp->session->video_read_codec) { + if (bp->session && switch_test_flag(bp, SMBF_READ_VIDEO_PATCH) && bp->session->video_read_codec) { switch_clear_flag(bp->session->video_read_codec, SWITCH_CODEC_FLAG_VIDEO_PATCHING); }