summaryrefslogtreecommitdiffstats
path: root/modules/webm/video_stream_webm.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-06-12 12:49:21 +0200
committerGitHub <noreply@github.com>2019-06-12 12:49:21 +0200
commit971b5160c61ccb7a009966d17d339997ea343da3 (patch)
treeff0d038213821bbf258f9fa9fd36288a7c7d9bbc /modules/webm/video_stream_webm.cpp
parentf160c81f683d8a523f23d3c4f7a76151a75fe875 (diff)
parent8245db869f05a86e88338236d22765b87cc71db8 (diff)
downloadredot-engine-971b5160c61ccb7a009966d17d339997ea343da3.tar.gz
Merge pull request #29306 from qarmin/small_code_fixes
Small fixes to unrechable code, possibly overflows, using NULL pointers
Diffstat (limited to 'modules/webm/video_stream_webm.cpp')
-rw-r--r--modules/webm/video_stream_webm.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp
index 6485c95360..3670edc9ea 100644
--- a/modules/webm/video_stream_webm.cpp
+++ b/modules/webm/video_stream_webm.cpp
@@ -413,10 +413,11 @@ void VideoStreamPlaybackWebm::delete_pointers() {
if (audio_frame)
memdelete(audio_frame);
- for (int i = 0; i < video_frames_capacity; ++i)
- memdelete(video_frames[i]);
- if (video_frames)
+ if (video_frames) {
+ for (int i = 0; i < video_frames_capacity; ++i)
+ memdelete(video_frames[i]);
memfree(video_frames);
+ }
if (video)
memdelete(video);