From: Bert Vermeulen Date: Mon, 27 Jan 2014 20:19:41 +0000 (+0100) Subject: rigol-ds: Deal with dev_close() getting called multiple times. X-Git-Tag: libsigrok-0.3.0~183 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=464d49360a02c6b378ebaf5ef38f4bb4536dd5ee;p=libsigrok.git rigol-ds: Deal with dev_close() getting called multiple times. --- 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;