diff --git a/libavutil/opt.c b/libavutil/opt.c index afa0c0ebc0..87ac570e5a 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1294,6 +1294,9 @@ const AVOption *av_opt_find2(void *obj, const char *name, const char *unit, c= *(AVClass**)obj; + if (!c) + return NULL; + if (search_flags & AV_OPT_SEARCH_CHILDREN) { if (search_flags & AV_OPT_SEARCH_FAKE_OBJ) { const AVClass *child = NULL;