diff options
-rw-r--r-- | libavutil/opt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index 24511defa2..15b681cc3f 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1430,8 +1430,10 @@ void av_opt_freep_ranges(AVOptionRanges **rangesp) for (i = 0; i < ranges->nb_ranges; i++) { AVOptionRange *range = ranges->range[i]; - av_freep(&range->str); - av_freep(&ranges->range[i]); + if (range) { + av_freep(&range->str); + av_freep(&ranges->range[i]); + } } av_freep(&ranges->range); av_freep(rangesp); |