]> sigrok.org Git - libsigrok.git/blobdiff - hardware/colead-slm/api.c
allow for intermediate stage in stopping acquisition
[libsigrok.git] / hardware / colead-slm / api.c
index 2330ad66f805a29543d95e1ec53c6634039b4379..eb3fa187c20851facff21e019439f709a145512f 100644 (file)
@@ -57,7 +57,9 @@ static int clear_instances(void)
        struct dev_context *devc;
        GSList *l;
 
-       drvc = di->priv;
+       if (!(drvc = di->priv))
+               return SR_OK;
+
        for (l = drvc->instances; l; l = l->next) {
                if (!(sdi = l->data))
                        continue;
@@ -303,8 +305,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
        return SR_OK;
 }
 
-static int hw_dev_acquisition_stop(const struct sr_dev_inst *sdi,
-                                  void *cb_data)
+static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
 {
        struct sr_datafeed_packet packet;
        struct dev_context *devc;