]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoder.c
decoder.c: Fix a scan-build warning.
[libsigrokdecode.git] / decoder.c
index 21b756ba370620bf99db2aefb8a31f0f7f9c6b10..bebe96cb8a9b8afe0932d22de1f9070b69717147 100644 (file)
--- 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);