2
0
forked from Ivasoft/DSView

fix: If the channel data is single, the cahnnel 2 access it cracked

This commit is contained in:
dreamsourcelabTAI
2023-03-30 11:19:50 +08:00
parent 96a201d3ac
commit 954d798b75

View File

@@ -1449,6 +1449,12 @@ bool DsoSignal::measure(const QPointF &p)
if (_hover_index >= _data->get_sample_count())
return false;
int chan_index = get_index();
if (_data->has_data(chan_index) == false){
dsv_err("channel %d have no data.", chan_index);
return false;
}
_hover_point = get_point(_hover_index, _hover_value);
_hover_en = true;
return true;