summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-05-29 11:58:39 +0200
committerGitHub <noreply@github.com>2020-05-29 11:58:39 +0200
commit1cecef624a000983b0e380aa8723056c92f9f4f2 (patch)
tree967dc735ae73e45ebb176177accda944ebc55c13
parent5fcc364e3ee68c3bc8fc59acf7d54e6252375f75 (diff)
parentd8eba6991dd64faf1c14b0cc200259398b64e4ac (diff)
downloadUXP-1cecef624a000983b0e380aa8723056c92f9f4f2.tar
UXP-1cecef624a000983b0e380aa8723056c92f9f4f2.tar.gz
UXP-1cecef624a000983b0e380aa8723056c92f9f4f2.tar.lz
UXP-1cecef624a000983b0e380aa8723056c92f9f4f2.tar.xz
UXP-1cecef624a000983b0e380aa8723056c92f9f4f2.zip
Merge pull request #1565 from Feodor2/master
Prevent null deref crash in WebrtcVideoConduit DTOR
-rwxr-xr-xmedia/webrtc/signaling/src/media-conduit/VideoConduit.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
index b406fded5..95f599be4 100755
--- a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
@@ -521,6 +521,8 @@ WebrtcVideoConduit::DeleteStreams()
mVideoCodecStat->EndOfCallStats();
}
mVideoCodecStat = nullptr;
+ //This does Release AudioConduit before mPtrViEBase set nullptr.
+ SyncTo(nullptr);
// We can't delete the VideoEngine until all these are released!
// And we can't use a Scoped ptr, since the order is arbitrary
mPtrViEBase = nullptr;
@@ -543,6 +545,11 @@ WebrtcVideoConduit::SyncTo(WebrtcAudioConduit *aConduit)
{
CSFLogDebug(logTag, "%s Synced to %p", __FUNCTION__, aConduit);
+ if (!mPtrViEBase) {
+ // ViEBase has already been released; we no longer have a conduit.
+ mSyncedTo = nullptr;
+ return;
+ }
// SyncTo(value) syncs to the AudioConduit, and if already synced replaces
// the current sync target. SyncTo(nullptr) cancels any existing sync and
// releases the strong ref to AudioConduit.