Commit e63a6641 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/vf_thumbnail: fix possible crash on error

parent 32bc0e04
......@@ -162,7 +162,7 @@ static av_cold void uninit(AVFilterContext *ctx)
{
int i;
ThumbContext *s = ctx->priv;
for (i = 0; i < s->n_frames && s->frames[i].buf; i++)
for (i = 0; i < s->n_frames && s->frames && s->frames[i].buf; i++)
av_frame_free(&s->frames[i].buf);
av_freep(&s->frames);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment