diff options
-rw-r--r-- | libavutil/opt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index e199170..8a98a9e 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -37,8 +37,10 @@ const AVOption *av_opt_next(void *obj, const AVOption *last) { AVClass *class = *(AVClass**)obj; - if (!last && class->option[0].name) return class->option; - if (last && last[1].name) return ++last; + if (!last && class->option && class->option[0].name) + return class->option; + if (last && last[1].name) + return ++last; return NULL; } |