summaryrefslogtreecommitdiff
path: root/modules/webm
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2019-06-03 21:52:50 +0200
committerqarmin <mikrutrafal54@gmail.com>2019-06-03 21:52:50 +0200
commit8245db869f05a86e88338236d22765b87cc71db8 (patch)
tree9cad264ada4820d48d6952f1a5564b32cb1619f2 /modules/webm
parent8c923fc61740afd560e6c814f7ef19b0cdc30112 (diff)
Small fixes to unrechable code, possibly overflows, using NULL pointers
Diffstat (limited to 'modules/webm')
-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);