From f98dbc7311a30a30802c71571ff5e3d049ea7556 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 21 May 2013 20:48:42 +0000 Subject: [PATCH] lavu/opt: check if class is NULL too Signed-off-by: Paul B Mahol --- libavutil/opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 1f0d6d0d65..4d06039273 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -63,7 +63,7 @@ const AVOption *av_next_option(void *obj, const AVOption *last) const AVOption *av_opt_next(void *obj, const AVOption *last) { AVClass *class = *(AVClass**)obj; - if (!last && class->option && class->option[0].name) + if (!last && class && class->option && class->option[0].name) return class->option; if (last && last[1].name) return ++last;