From 03967cd7bf9dddcf1affea3e5c8d4a21fe5e6f77 Mon Sep 17 00:00:00 2001 From: Elad Alon Date: Tue, 10 Oct 2017 17:23:53 +0200 Subject: [PATCH] RtcEventLogOutputFile needs to reset file_ whenever the file is not successfully opened MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RtcEventLogOutputFile needs to reset file_ whenever the file is not successfully opened. (The destructor DCHECKs that file_ only exists if it's active, so as to help maintain this.) Bug: webrtc:8111 Change-Id: I9a375a142af821b3c7183032f0b5d4d612dfa6b8 Reviewed-on: https://webrtc-review.googlesource.com/8080 Commit-Queue: Elad Alon Reviewed-by: Björn Terelius Cr-Commit-Position: refs/heads/master@{#20229} --- logging/rtc_event_log/output/rtc_event_log_output_file.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logging/rtc_event_log/output/rtc_event_log_output_file.cc b/logging/rtc_event_log/output/rtc_event_log_output_file.cc index 2f8b81c20c..2e06a3692f 100644 --- a/logging/rtc_event_log/output/rtc_event_log_output_file.cc +++ b/logging/rtc_event_log/output/rtc_event_log_output_file.cc @@ -55,8 +55,8 @@ RtcEventLogOutputFile::RtcEventLogOutputFile(rtc::PlatformFile file, // and needs to be closed. if (!rtc::ClosePlatformFile(file)) { LOG(LS_ERROR) << "Can't close file."; - file_.reset(); } + file_.reset(); return; }