X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/blobdiff_plain/c31be45e144a5f4748c9b9d5b8802f254550a471..9d7c1b4cf36737bde226d0f7bb4e271e61e4e8a6:/libavformat/aviobuf.c diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 2f57c55..45a8bad 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -785,8 +785,12 @@ int avio_open2(AVIOContext **s, const char *filename, int flags, int avio_close(AVIOContext *s) { - URLContext *h = s->opaque; + URLContext *h; + + if (!s) + return 0; + h = s->opaque; av_free(s->buffer); av_free(s); return ffurl_close(h);