X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Flecroy-xstream%2Fapi.c;fp=src%2Fhardware%2Flecroy-xstream%2Fapi.c;h=070ac7c13f7a4428afcb4c5199f60891da57302e;hb=724b4945d59c42f42a65ccfbe0a6ecf8744ee58f;hp=533275a28882deeb7f2fd43e24def96a6a37ac6a;hpb=24985129729715ee08cdc021b1d5e552c6b6b312;p=libsigrok.git diff --git a/src/hardware/lecroy-xstream/api.c b/src/hardware/lecroy-xstream/api.c index 533275a2..070ac7c1 100644 --- a/src/hardware/lecroy-xstream/api.c +++ b/src/hardware/lecroy-xstream/api.c @@ -360,6 +360,14 @@ SR_PRIV int lecroy_xstream_request_data(const struct sr_dev_inst *sdi) struct dev_context *devc; devc = sdi->priv; + + /* + * We may be left with an invalid current_channel if acquisition was + * already stopped but we are processing the last pending events. + */ + if (!devc->current_channel) + return SR_ERR_NA; + ch = devc->current_channel->data; if (ch->type != SR_CHANNEL_ANALOG)