rigol-ds: silence potential NULL dereference compiler warning
Check pointers' validity before dereferencing them. This was reported by clang's scan-build.
This commit is contained in:
parent
b04cbd0ba3
commit
0306ae30b6
|
@ -752,6 +752,8 @@ static int config_list(uint32_t key, GVariant **data,
|
||||||
case SR_CONF_DEVICE_OPTIONS:
|
case SR_CONF_DEVICE_OPTIONS:
|
||||||
if (!cg)
|
if (!cg)
|
||||||
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
|
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
|
||||||
|
if (!devc)
|
||||||
|
return SR_ERR_ARG;
|
||||||
if (cg == devc->digital_group) {
|
if (cg == devc->digital_group) {
|
||||||
*data = std_gvar_array_u32(NULL, 0);
|
*data = std_gvar_array_u32(NULL, 0);
|
||||||
return SR_OK;
|
return SR_OK;
|
||||||
|
|
Loading…
Reference in New Issue