summaryrefslogtreecommitdiff
path: root/libavfilter/vf_deshake.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vf_deshake.c')
-rw-r--r--libavfilter/vf_deshake.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
index 6b2a3d4c7d..ff78f1f883 100644
--- a/libavfilter/vf_deshake.c
+++ b/libavfilter/vf_deshake.c
@@ -420,7 +420,8 @@ static av_cold void uninit(AVFilterContext *ctx)
avfilter_unref_buffer(deshake->ref);
if (deshake->fp)
fclose(deshake->fp);
- avcodec_close(deshake->avctx);
+ if (deshake->avctx)
+ avcodec_close(deshake->avctx);
av_freep(&deshake->avctx);
}