FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_core_media_bug.c

This commit is contained in:
Andrey Volk 2019-07-12 20:40:57 +04:00
parent 21f9c47dd5
commit cdd3b6f448
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}