X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fchronovu-la8%2Fapi.c;h=6e5fd5b695638dfc3699516d9e1a43baa87717dc;hb=695d0e1efa819dc98914ce1baec388c8734e98a7;hp=08e06c32afe717823493a3b5e2b309f8a5b7de9f;hpb=415e6389ce2d57e9559a04f0e3523d111843a618;p=libsigrok.git diff --git a/hardware/chronovu-la8/api.c b/hardware/chronovu-la8/api.c index 08e06c32..6e5fd5b6 100644 --- a/hardware/chronovu-la8/api.c +++ b/hardware/chronovu-la8/api.c @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the libsigrok project. * * Copyright (C) 2011-2012 Uwe Hermann * @@ -308,6 +308,9 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi) { struct dev_context *devc; + if (sdi->status != SR_ST_ACTIVE) + return SR_ERR_DEV_CLOSED; + if (!(devc = sdi->priv)) { sr_err("%s: sdi->priv was NULL.", __func__); return SR_ERR_BUG; @@ -433,6 +436,9 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, uint8_t buf[4]; int bytes_written; + if (sdi->status != SR_ST_ACTIVE) + return SR_ERR_DEV_CLOSED; + if (!(devc = sdi->priv)) { sr_err("%s: sdi->priv was NULL.", __func__); return SR_ERR_BUG;