aboutsummaryrefslogtreecommitdiff
path: root/libavutil/opt.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r--libavutil/opt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c
index f2b947337e..cba5b29ac6 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -650,6 +650,9 @@ const AVOption *av_opt_find2(void *obj, const char *name, const char *unit,
const AVClass *c = *(AVClass**)obj;
const AVOption *o = NULL;
+ if (!c)
+ return NULL;
+
if (search_flags & AV_OPT_SEARCH_CHILDREN) {
if (search_flags & AV_OPT_SEARCH_FAKE_OBJ) {
const AVClass *child = NULL;