Fix crash when destroying NetLog

This commit is contained in:
deepak1556 2017-11-02 20:36:18 +05:30 committed by Cheng Zhao
parent 214cbf357a
commit 505f2ab9e7

View file

@ -38,8 +38,10 @@ NetLog::NetLog() {
}
NetLog::~NetLog() {
file_net_log_observer_->StopObserving(nullptr, base::Closure());
file_net_log_observer_.reset();
if (file_net_log_observer_) {
file_net_log_observer_->StopObserving(nullptr, base::Closure());
file_net_log_observer_.reset();
}
}
void NetLog::StartLogging() {