mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 13:48:38 -05:00
add ternary to catch possible null pointer bump
This commit is contained in:
parent
2a9eadbf9a
commit
24179afd28
@ -61,7 +61,9 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||
if (!wxGetApp().getAudioVisualQueue()->empty()) {
|
||||
AudioThreadInput *demodAudioData;
|
||||
wxGetApp().getAudioVisualQueue()->pop(demodAudioData);
|
||||
int iMax = demodAudioData->data.size();
|
||||
|
||||
int iMax = demodAudioData?demodAudioData->data.size():0;
|
||||
|
||||
if (demodAudioData && iMax) {
|
||||
if (waveform_points.size() != iMax * 2) {
|
||||
waveform_points.resize(iMax * 2);
|
||||
|
Loading…
Reference in New Issue
Block a user