avopt: fix segfault

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-05-27 16:54:22 +02:00
parent 041dbd3c14
commit 87ababd7c5
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ const AVOption *av_find_opt(void *v, const char *name, const char *unit, int mas
const AVOption *av_next_option(void *obj, const AVOption *last) const AVOption *av_next_option(void *obj, const AVOption *last)
{ {
if (last && last[1].name) return ++last; if (last && last[1].name) return ++last;
else if (last) return NULL; else if (last || !(*(AVClass**)obj)->option->name) return NULL;
else return (*(AVClass**)obj)->option; else return (*(AVClass**)obj)->option;
} }