mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-23 12:18:37 -05:00
Fixes a rare crash while testing..
This commit is contained in:
parent
0c1f3149ac
commit
a9181594e2
@ -89,6 +89,12 @@ void SpectrumVisualProcessor::process() {
|
||||
|
||||
input->pop(iqData);
|
||||
|
||||
if (!iqData) {
|
||||
return;
|
||||
}
|
||||
|
||||
iqData->busy_rw.lock();
|
||||
|
||||
std::vector<liquid_float_complex> *data = &iqData->data;
|
||||
|
||||
if (data && data->size()) {
|
||||
@ -102,6 +108,8 @@ void SpectrumVisualProcessor::process() {
|
||||
|
||||
if (is_view.load()) {
|
||||
if (!iqData->frequency || !iqData->sampleRate) {
|
||||
iqData->decRefCount();
|
||||
iqData->busy_rw.unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -290,5 +298,6 @@ void SpectrumVisualProcessor::process() {
|
||||
}
|
||||
|
||||
iqData->decRefCount();
|
||||
iqData->busy_rw.unlock();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user