X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fscpi-pps%2Fprotocol.c;h=825fdb945257a32b62eaadc36f8f7d57fee1534b;hb=42f6dd550257cc6a5ef227f76a168ea8db82bebb;hp=9609936a23ae0604df899b9ddc23482c12111715;hpb=969671a542f3af8d918e57205e80670a11e8c1fa;p=libsigrok.git diff --git a/src/hardware/scpi-pps/protocol.c b/src/hardware/scpi-pps/protocol.c index 9609936a..825fdb94 100644 --- a/src/hardware/scpi-pps/protocol.c +++ b/src/hardware/scpi-pps/protocol.c @@ -97,7 +97,13 @@ SR_PRIV int scpi_pps_receive_data(int fd, int revents, void *cb_data) if (ret != SR_OK) return ret; - ch_spec = &devc->device->channels[pch->hw_output_idx]; + if (devc->channels) { + /* Dynamically-probed devices. */ + ch_spec = &devc->channels[pch->hw_output_idx]; + } else { + /* Statically-configured devices. */ + ch_spec = &devc->device->channels[pch->hw_output_idx]; + } packet.type = SR_DF_ANALOG; packet.payload = &analog; /* Note: digits/spec_digits will be overridden later. */