Commit f4ba183b authored by Maggie Chen's avatar Maggie Chen Committed by Commit Bot

Fix a crash in gl::DirectCompositionSurfaceWin::Destroy

if DirectCompositionSurfaceWin::Initialize() fails before dcomp_device_
is created. It will cause access violation at dcomp_device_->Commit() in
DirectCompositionSurfaceWin::Destroy()/ ~DirectCompositionSurfaceWin();

Bug: 1088408
Change-Id: I57c07599b2bb5f6f42e48128c25d4f74da65ff8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2225328Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773778}
parent 780920b2
......@@ -608,7 +608,8 @@ void DirectCompositionSurfaceWin::Destroy() {
// that if DWM.exe crashes, the Chromium window will become black until
// the next Commit.
layer_tree_.reset();
dcomp_device_->Commit();
if (dcomp_device_)
dcomp_device_->Commit();
}
gfx::Size DirectCompositionSurfaceWin::GetSize() {
......
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