]> sigrok.org Git - libsigrok.git/commitdiff
rdtech-dps: Add missing devc initialisation.
authorFrank Stettner <redacted>
Sun, 9 May 2021 16:55:08 +0000 (18:55 +0200)
committerGerhard Sittig <redacted>
Sun, 9 May 2021 17:29:38 +0000 (19:29 +0200)
src/hardware/rdtech-dps/protocol.c

index 7005a7a114fdfec65764e56b1c164159b1c51f54..9ce2eb66e3a855337dc63f0bed452ba165f511f1 100644 (file)
@@ -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;