X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Ffx2lafw%2Ffx2lafw.c;h=dbec30b754904e84244135a3bfb1a73e276501cd;hb=e73ffd4238c6d1be58d3fcdcf7f100200f033856;hp=f74c5a510b0f1fe4d6035ba37e3708c746820cd7;hpb=efdecf4c0553ce00ea2a6365212f5fe305496fed;p=libsigrok.git diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index f74c5a51..dbec30b7 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -617,6 +617,9 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi) struct dev_context *devc; int ret; + if (sdi->status != SR_ST_ACTIVE) + return SR_ERR; + devc = sdi->priv; if (id == SR_CONF_SAMPLERATE) { @@ -948,6 +951,9 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, unsigned char *buf; size_t size; + if (sdi->status != SR_ST_ACTIVE) + return SR_ERR_DEV_CLOSED; + drvc = di->priv; devc = sdi->priv; usb = sdi->conn;