]> sigrok.org Git - libsigrok.git/commitdiff
rdtech-dps: Prevent null pointer exception
authorSoeren Apel <redacted>
Thu, 28 Sep 2023 10:18:30 +0000 (12:18 +0200)
committerSoeren Apel <redacted>
Thu, 28 Sep 2023 10:18:30 +0000 (12:18 +0200)
src/hardware/rdtech-dps/api.c

index db9601f1b9f2fdf8a3efc5f0337d7498cb12718f..603fec9e68883b9c5080edbba947b8c23633a25f 100644 (file)
@@ -534,7 +534,7 @@ static int config_list(uint32_t key, GVariant **data,
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
        case SR_CONF_DEVICE_OPTIONS:
-               if (devc->model->n_ranges > 1)
+               if (devc && (devc->model->n_ranges > 1))
                        return STD_CONFIG_LIST(key, data, sdi, cg, scanopts,
                                drvopts, devopts_w_range);
                else