diff --git a/hardware/rigol-ds/api.c b/hardware/rigol-ds/api.c index 76c2efc7..f61d58ca 100644 --- a/hardware/rigol-ds/api.c +++ b/hardware/rigol-ds/api.c @@ -482,6 +482,9 @@ static int dev_close(struct sr_dev_inst *sdi) struct sr_scpi_dev_inst *scpi; struct dev_context *devc; + if (sdi->status != SR_ST_INACTIVE) + return SR_OK; + scpi = sdi->conn; devc = sdi->priv;