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>
pull/64/head
Lukasz Marek 11 years ago committed by Michael Niedermayer
parent 09656707cc
commit 8c27292373
  1. 3
      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);

Loading…
Cancel
Save