Commit 39eed05b authored by Byron Campen's avatar Byron Campen
Browse files

Bug 1402997: Fix bug where PeerConnectionWrapper would crash if...

Bug 1402997: Fix bug where PeerConnectionWrapper would crash if PeerConnectionCtx is shut down. r=mjf

Depends on D138544

Differential Revision: https://phabricator.services.mozilla.com/D138545
parent 0f838c8e
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -2391,14 +2391,9 @@ bool PeerConnectionImpl::IsClosed() const {

PeerConnectionWrapper::PeerConnectionWrapper(const std::string& handle)
    : impl_(nullptr) {
  PeerConnectionImpl* impl =
      PeerConnectionCtx::GetInstance()->GetPeerConnection(handle);

  if (!PeerConnectionCtx::isActive() || !impl) {
    return;
  if (PeerConnectionCtx::isActive()) {
    impl_ = PeerConnectionCtx::GetInstance()->GetPeerConnection(handle);
  }

  impl_ = impl;
}

const RefPtr<MediaTransportHandler> PeerConnectionImpl::GetTransportHandler()