Commit 53f8cf89 authored by Vasiliy Telezhnikov's avatar Vasiliy Telezhnikov Committed by Commit Bot

Fixed crash in ~VizProcessContextProvider()

Add check for |cache_controller_| in ~VizProcessContextProvider().
It can be nullptr if InitializeContext() failed.

Bug: 1008966
Change-Id: I13204bdf56996850186dcfd312374b05c8161b40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829546Reviewed-by: default avatarJonathan Ross <jonross@chromium.org>
Reviewed-by: default avatarSunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700824}
parent a52405b3
......@@ -138,7 +138,10 @@ VizProcessContextProvider::~VizProcessContextProvider() {
base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
this);
}
cache_controller_->SetGrContext(nullptr);
// cache_controller_ might ne nullptr if we failed to initialize
if (cache_controller_)
cache_controller_->SetGrContext(nullptr);
}
void VizProcessContextProvider::AddRef() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment