]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_core_medi...
authorAndrey Volk <andywolk@gmail.com>
Fri, 12 Jul 2019 16:40:57 +0000 (20:40 +0400)
committerAndrey Volk <andywolk@gmail.com>
Mon, 15 Jul 2019 19:41:40 +0000 (23:41 +0400)
src/switch_core_media_bug.c

index 2a473d0c3d966db931f90fd06933cc97c7ff450e..80b6cfc6002ee860df8707473c206a27943b28fd 100644 (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);
        }