Index: webrtc/api/peerconnection.cc |
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc |
index 830c301a6d9cf0090870e3a06bca4ce23835ec0c..a13bcda7a79bde4c649830064fdd968e61ecc481 100644 |
--- a/webrtc/api/peerconnection.cc |
+++ b/webrtc/api/peerconnection.cc |
@@ -886,6 +886,9 @@ bool PeerConnection::GetStats(StatsObserver* observer, |
} |
stats_->UpdateStats(level); |
+ if (!stats_->IsValidTrack(track)) { |
Taylor Brandstetter
2016/11/03 22:47:01
May be worth logging a warning here.
Also, you co
Zhi Huang
2016/11/03 23:17:27
I realized that the nullptr is not an error. The n
|
+ return false; |
+ } |
signaling_thread()->Post(RTC_FROM_HERE, this, MSG_GETSTATS, |
new GetStatsMsg(observer, track)); |
return true; |