From 0fb6ad2004d3b86cb912c93a773e3f9162392e54 Mon Sep 17 00:00:00 2001 From: "pbos@webrtc.org" Date: Wed, 3 Dec 2014 13:44:29 +0000 Subject: [PATCH] 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 --- talk/media/webrtc/webrtcvideoengine2.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/talk/media/webrtc/webrtcvideoengine2.cc b/talk/media/webrtc/webrtcvideoengine2.cc index 17adba79c..3a5daf0e5 100644 --- a/talk/media/webrtc/webrtcvideoengine2.cc +++ b/talk/media/webrtc/webrtcvideoengine2.cc @@ -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; }