Skip to content

Commit 2e9e09d

Browse files
committed
WaveformArea: fixed broken null check causing segfault when attempting to autoscale a null waveform. Fixes #978.
1 parent 99915ef commit 2e9e09d

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

release-notes/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ NOTE: This section only list changes which are potentially breaking to an *end u
9393
* GUI: Pressing middle mouse on the Y axis to autoscale would fail, setting the full scale range to zero volts, if the waveform was resident in GPU memory and the CPU-side copy of the buffer was stale
9494
* GUI: History dialog allowed zero or negative values for history depth (https://github.com/ngscopeclient/scopehal-apps/issues/940)
9595
* GUI: Eye patterns and constellations would forget the selected color ramp when moved to a new location (https://github.com/ngscopeclient/scopehal-apps/issues/556)
96+
* GUI: crash when autoscaling an empty waveform (https://github.com/ngscopeclient/scopehal-apps/issues/978)
9697
* Session files: Windows build could not load session files containing sample rates or memory depths in excess of 2^32
9798

9899
## Other changes since v0.1.1

src/ngscopeclient/WaveformArea.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4524,6 +4524,8 @@ void WaveformArea::AutofitVertical()
45244524
for(auto& c : m_displayedChannels)
45254525
{
45264526
auto data = c->GetStream().GetData();
4527+
if(!data)
4528+
continue;
45274529
data->PrepareForCpuAccess();
45284530
auto sdata = dynamic_cast<SparseAnalogWaveform*>(data);
45294531
auto udata = dynamic_cast<UniformAnalogWaveform*>(data);

0 commit comments

Comments
 (0)