summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-31 08:48:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-03-31 08:48:23 +0200
commitc5f9a66f7453f44d0bf612ad3c5e98e7309cdf86 (patch)
tree8441a1937ecf0307162d219f32e6dfaf811a30cb /libavfilter/avfilter.c
parenta79af8e8cb6b33a9b33b3947a43efe64a00b11e4 (diff)
avfilter: allow freeing NULL.
this way avfilter_free() can be called without NULL checks. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 706f7e2694..141fb9d7ca 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -834,6 +834,9 @@ void avfilter_free(AVFilterContext *filter)
int i;
AVFilterLink *link;
+ if (!filter)
+ return;
+
if (filter->filter->uninit)
filter->filter->uninit(filter);