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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 2061593002: Fix crash when switching to a profile that cannot be opened (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bug-614753-fix
Patch Set: Respond to pkasting@'s comments Created 4 years, 5 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
Index: chrome/browser/profiles/profile_io_data.cc
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 528be3c7316f4642a236d7df2db954af8ed9ff76..f2f5b5c2068051b704c366664642b923c15fad9d 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -1308,8 +1308,10 @@ void ProfileIOData::DestroyResourceContext() {
// notifications by severing the link between it and the
// cert_transparency_verifier_ and unregistering it from new STH
// notifications.
- cert_transparency_verifier_->SetObserver(nullptr);
- ct_tree_tracker_unregistration_.Run();
+ if (cert_transparency_verifier_)
+ cert_transparency_verifier_->SetObserver(nullptr);
+ if (!ct_tree_tracker_unregistration_.is_null())
+ ct_tree_tracker_unregistration_.Run();
}
std::unique_ptr<net::HttpNetworkSession>

Powered by Google App Engine
This is Rietveld 408576698