diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llwebrtc/llwebrtc.cpp | 18 | ||||
| -rw-r--r-- | indra/llwebrtc/llwebrtc_impl.h | 2 | ||||
| -rw-r--r-- | indra/newview/llvoiceclient.cpp | 9 | 
3 files changed, 25 insertions, 4 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index 23e1076765..828896f620 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -342,8 +342,11 @@ void LLWebRTCImpl::init()      mWorkerThread->PostTask(          [this]()          { -            mDeviceModule->EnableBuiltInAEC(false); -            updateDevices(); +            if (mDeviceModule) +            { +                mDeviceModule->EnableBuiltInAEC(false); +                updateDevices(); +            }          });  } @@ -449,6 +452,11 @@ void LLWebRTCImpl::unsetDevicesObserver(LLWebRTCDevicesObserver *observer)  // must be run in the worker thread.  void LLWebRTCImpl::workerDeployDevices()  { +    if (!mDeviceModule) +    { +        return; +    } +      int16_t recordingDevice = RECORD_DEVICE_DEFAULT;      int16_t recording_device_start = 0; @@ -571,6 +579,11 @@ void LLWebRTCImpl::setRenderDevice(const std::string &id)  // updateDevices needs to happen on the worker thread.  void LLWebRTCImpl::updateDevices()  { +    if (!mDeviceModule) +    { +        return; +    } +      int16_t renderDeviceCount  = mDeviceModule->PlayoutDevices();      mPlayoutDeviceList.clear(); @@ -1491,6 +1504,7 @@ void terminate()      if (gWebRTCImpl)      {          gWebRTCImpl->terminate(); +        delete gWebRTCImpl;          gWebRTCImpl = nullptr;      }  } diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h index dee081119b..df06cb88fa 100644 --- a/indra/llwebrtc/llwebrtc_impl.h +++ b/indra/llwebrtc/llwebrtc_impl.h @@ -75,7 +75,7 @@ public:      LLWebRTCLogSink(LLWebRTCLogCallback* callback) : mCallback(callback) {}      // Destructor: close the log file -    ~LLWebRTCLogSink() override {} +    ~LLWebRTCLogSink() override { mCallback = nullptr; }      void OnLogMessage(const std::string& msg, webrtc::LoggingSeverity severity) override      { diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 3edd2b473c..71a9e71a9f 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -292,7 +292,14 @@ void LLVoiceClient::setHidden(bool hidden)  void LLVoiceClient::terminate()  { -    if (mSpatialVoiceModule) mSpatialVoiceModule->terminate(); +    if (LLVivoxVoiceClient::instanceExists()) +    { +        LLWebRTCVoiceClient::getInstance()->terminate(); +    } +    if (LLVivoxVoiceClient::instanceExists()) +    { +        LLVivoxVoiceClient::getInstance()->terminate(); +    }      mSpatialVoiceModule = NULL;      m_servicePump = NULL;  | 
