From: Soeren Apel Date: Thu, 28 Sep 2023 10:18:30 +0000 (+0200) Subject: rdtech-dps: Prevent null pointer exception X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=35280a96184cdf8781728a2a315e5d560aaf7654;p=libsigrok.git rdtech-dps: Prevent null pointer exception --- diff --git a/src/hardware/rdtech-dps/api.c b/src/hardware/rdtech-dps/api.c index db9601f1..603fec9e 100644 --- a/src/hardware/rdtech-dps/api.c +++ b/src/hardware/rdtech-dps/api.c @@ -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