X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=decoder.c;h=bebe96cb8a9b8afe0932d22de1f9070b69717147;hb=3389df7d5d85edc9453c3bd7f3556154152af501;hp=21b756ba370620bf99db2aefb8a31f0f7f9c6b10;hpb=35c10c0e24881de50b3391b1f3ecc9e43aa361b3;p=libsigrokdecode.git diff --git a/decoder.c b/decoder.c index 21b756b..bebe96c 100644 --- a/decoder.c +++ b/decoder.c @@ -340,7 +340,7 @@ static int get_options(struct srd_decoder *d) if (!py_item) goto except_out; - if (Py_TYPE(py_default) != Py_TYPE(py_item)) { + if (py_default && (Py_TYPE(py_default) != Py_TYPE(py_item))) { srd_err("All values for option '%s' must be " "of the same type as the default.", o->id);