lavu/opt: check if class is NULL too

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2013-05-21 20:48:42 +00:00
parent 39dc1bc90f
commit f98dbc7311

View File

@ -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;