Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Unified Diff: talk/media/webrtc/webrtcvoiceengine.cc

Issue 1666843003: Bugfix to stop chrome from crashing. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added namespace. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvoiceengine.cc
diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc
index 46d780e3d9ecbcee7448b2bc70862d0ac8c41cb2..150042300de48cd572d46854784ba21550602a31 100644
--- a/talk/media/webrtc/webrtcvoiceengine.cc
+++ b/talk/media/webrtc/webrtcvoiceengine.cc
@@ -1153,12 +1153,22 @@ void WebRtcVoiceEngine::StopAecDump() {
bool WebRtcVoiceEngine::StartRtcEventLog(rtc::PlatformFile file) {
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
- return voe_wrapper_->codec()->GetEventLog()->StartLogging(file);
+ webrtc::RtcEventLog* event_log = voe_wrapper_->codec()->GetEventLog();
+ if (event_log) {
+ return event_log->StartLogging(file);
+ }
+ LOG_RTCERR0(StartRtcEventLog);
+ return false;
}
void WebRtcVoiceEngine::StopRtcEventLog() {
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
- voe_wrapper_->codec()->GetEventLog()->StopLogging();
+ webrtc::RtcEventLog* event_log = voe_wrapper_->codec()->GetEventLog();
+ if (event_log) {
+ event_log->StopLogging();
+ return;
+ }
+ LOG_RTCERR0(StopRtcEventLog);
}
int WebRtcVoiceEngine::CreateVoEChannel() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698