diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 49fe172be0..48f5b49841 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -275,7 +275,7 @@ static av_cold void uninit(AVFilterContext *ctx) { Frei0rContext *frei0r = ctx->priv; - if (frei0r->destruct) + if (frei0r->destruct && frei0r->instance) frei0r->destruct(frei0r->instance); if (frei0r->deinit) frei0r->deinit();