devices = NULL;
- clear_instances();
-
if (!(devc = g_try_malloc(sizeof(struct dev_context)))) {
sr_err("%s: devc malloc failed", __func__);
return NULL;
struct dev_context *devc;
int ret;
+ if (sdi->status != SR_ST_ACTIVE)
+ return SR_ERR_DEV_CLOSED;
+
devc = sdi->priv;
if (id == SR_CONF_SAMPLERATE) {
struct triggerinout triggerinout_conf;
struct triggerlut lut;
+ if (sdi->status != SR_ST_ACTIVE)
+ return SR_ERR_DEV_CLOSED;
+
devc = sdi->priv;
if (configure_probes(sdi) != SR_OK) {