summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 6ecd4ce4c2..4fbb6bf4a6 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -70,6 +70,8 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
void avfilter_unref_buffer(AVFilterBufferRef *ref)
{
+ if (!ref)
+ return;
if (!(--ref->buf->refcount))
ref->buf->free(ref->buf);
av_free(ref->video);