X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoder.c;h=bebe96cb8a9b8afe0932d22de1f9070b69717147;hp=21b756ba370620bf99db2aefb8a31f0f7f9c6b10;hb=8390f85af4a379f4e0a9305912d6d62ce09c6fc1;hpb=35c10c0e24881de50b3391b1f3ecc9e43aa361b3 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);