Bug 1264479: don't crash on disappearing data channels. r=bwc

MozReview-Commit-ID: 3DmM7teByR8

--HG--
extra : rebase_source : 238054d17ff624eb203f8352493cd2ce99e11402
This commit is contained in:
Nils Ohlmeier [:drno] 2017-08-31 14:30:50 -07:00
Родитель e3c345fd9b
Коммит b81119f1e6
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -1984,6 +1984,11 @@ PeerConnectionImpl::RemoveOldRemoteTracks(RefPtr<PeerConnectionObserver>& aPco)
const std::string& streamId = removedTrack->GetStreamId();
const std::string& trackId = removedTrack->GetTrackId();
if (removedTrack->GetMediaType() == SdpMediaSection::kApplication) {
// TODO do we need to notify content somehow here?
continue;
}
RefPtr<RemoteSourceStreamInfo> info = mMedia->GetRemoteStreamById(streamId);
if (!info) {
MOZ_ASSERT(false, "A stream/track was removed that wasn't in PCMedia. "