lecroy-xstream: Properly handle a stopping acquisition

This commit is contained in:
Soeren Apel 2018-01-03 23:44:27 +01:00 committed by Uwe Hermann
parent 2498512972
commit 724b4945d5
1 changed files with 8 additions and 0 deletions

View File

@ -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)