mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 13:48:38 -05:00
Fix AudioThread nullptr check
This commit is contained in:
parent
9bbcb582e3
commit
3a5b30dda8
@ -449,7 +449,7 @@ void AudioThread::run() {
|
||||
if (inputQueue != nullptr) {
|
||||
inputQueue->flush();
|
||||
}
|
||||
|
||||
|
||||
//Nullify currentInput...
|
||||
currentInput = nullptr;
|
||||
|
||||
@ -486,6 +486,10 @@ void AudioThread::setActive(bool state) {
|
||||
|
||||
std::lock_guard<std::recursive_mutex> lock(m_mutex);
|
||||
|
||||
if (deviceController[parameters.deviceId] == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (state && !active && inputQueue) {
|
||||
deviceController[parameters.deviceId]->bindThread(this);
|
||||
} else if (!state && active) {
|
||||
|
Loading…
Reference in New Issue
Block a user