Fix AudioThread nullptr check

This commit is contained in:
vsonnier 2017-08-31 21:24:05 +02:00
parent 9bbcb582e3
commit 3a5b30dda8

View File

@ -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) {