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;