From: Frank Stettner Date: Sun, 9 May 2021 16:55:08 +0000 (+0200) Subject: rdtech-dps: Add missing devc initialisation. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4efd5462c78f1b44cd30a45a2b1f37053d5b7b60;p=libsigrok.git rdtech-dps: Add missing devc initialisation. --- diff --git a/src/hardware/rdtech-dps/protocol.c b/src/hardware/rdtech-dps/protocol.c index 7005a7a1..9ce2eb66 100644 --- a/src/hardware/rdtech-dps/protocol.c +++ b/src/hardware/rdtech-dps/protocol.c @@ -586,6 +586,10 @@ SR_PRIV int rdtech_dps_seed_receive(const struct sr_dev_inst *sdi) struct rdtech_dps_state state; int ret; + if (!sdi || !sdi->priv) + return SR_ERR_ARG; + devc = sdi->priv; + ret = rdtech_dps_get_state(sdi, &state, ST_CTX_PRE_ACQ); if (ret != SR_OK) return ret;