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