rigol-ds: Fix divide by zero when no analog probes selected.

This commit is contained in:
Martin Ling 2014-01-22 05:07:20 +00:00 committed by Bert Vermeulen
parent 7d63347e90
commit 824eb2acfd
1 changed files with 3 additions and 0 deletions

View File

@ -515,6 +515,9 @@ static int analog_frame_size(const struct sr_dev_inst *sdi)
analog_probes++;
}
if (analog_probes == 0)
return 0;
switch (devc->data_source) {
case DATA_SOURCE_LIVE:
return devc->model->series->live_samples;