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> |