mirror of
https://github.com/miek/inspectrum.git
synced 2026-03-12 03:07:15 +01:00
fix(plotview): check return value of getSamples for export
This commit is contained in:
@@ -280,8 +280,10 @@ void PlotView::exportSamples(std::shared_ptr<AbstractSampleSource> src)
|
||||
for (index = start; index < end; index += step) {
|
||||
off_t length = std::min(step, end - index);
|
||||
auto samples = complexSrc->getSamples(index, length);
|
||||
for (auto i = 0; i < length; i += decimation.value()) {
|
||||
os.write((const char*)&samples[i], 8);
|
||||
if (samples != nullptr) {
|
||||
for (auto i = 0; i < length; i += decimation.value()) {
|
||||
os.write((const char*)&samples[i], 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user