Commit f98dbc73 authored by Paul B Mahol's avatar Paul B Mahol

lavu/opt: check if class is NULL too

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 39dc1bc9
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment