Check if cpu_monitor_ exists before Stop().

R=asapersson@webrtc.org
BUG=1788

Review URL: https://webrtc-codereview.appspot.com/25279004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7797 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2014-12-03 13:44:29 +00:00
parent fa914e283c
commit 0fb6ad2004

View File

@ -339,7 +339,8 @@ bool WebRtcVideoEngine2::Init(rtc::Thread* worker_thread) {
void WebRtcVideoEngine2::Terminate() {
LOG(LS_INFO) << "WebRtcVideoEngine2::Terminate";
cpu_monitor_->Stop();
if (cpu_monitor_.get() != NULL)
cpu_monitor_->Stop();
initialized_ = false;
}