diff --git a/libavutil/frame.c b/libavutil/frame.c index 4596927f97..4ae75ef5d2 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -463,6 +463,9 @@ void av_frame_unref(AVFrame *frame) { int i; + if (!frame) + return; + wipe_side_data(frame); for (i = 0; i < FF_ARRAY_ELEMS(frame->buf); i++)