X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Frdtech-dps%2Fprotocol.c;h=9ce2eb66e3a855337dc63f0bed452ba165f511f1;hb=4da62209ddfa3aad12678c7141c19e9c3e8419c1;hp=7005a7a114fdfec65764e56b1c164159b1c51f54;hpb=7a78fd56f70b4739d6002ae6bd8ca2a70a2e96e3;p=libsigrok.git 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;