diff options
author | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-04-03 14:44:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-03 19:05:19 +0200 |
commit | 8c272923736861cccfae0befebf09760baf54bf1 (patch) | |
tree | 2c56bf22d3e79018f62e422868bbb3284bf6b537 /libavutil | |
parent | 09656707cc756be57f6848dcd79f562df2698382 (diff) | |
download | ffmpeg-8c272923736861cccfae0befebf09760baf54bf1.tar.gz |
lavu/opt: dont crash on freeing NULL AVOptionRanges
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/opt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index cffa5a6a24..ea2a5b7d48 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1608,6 +1608,9 @@ void av_opt_freep_ranges(AVOptionRanges **rangesp) int i; AVOptionRanges *ranges = *rangesp; + if (!ranges) + return; + for (i = 0; i < ranges->nb_ranges * ranges->nb_components; i++) { AVOptionRange *range = ranges->range[i]; av_freep(&range->str); |