Commit 46598017 authored by bsheedy's avatar bsheedy Committed by Commit Bot

Fix WebXR renderer crash

Adds early returns to XRWebGLDrawingBuffer if the drawing buffer client
is null. This fixes a segfault that was causing a renderer crash when
exiting (or entering?) WebXR presentation.

Bug: 833620
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Iaf03bff95f542da63e871b1abf8a96e1b0b29d7f
Reviewed-on: https://chromium-review.googlesource.com/1014480Reviewed-by: default avatarIan Vollick <vollick@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551361}
parent 02157052
......@@ -250,6 +250,8 @@ void XRWebGLDrawingBuffer::UseSharedBuffer(
}
DrawingBuffer::Client* client = drawing_buffer_->client();
if (!client)
return;
client->DrawingBufferClientRestoreFramebufferBinding();
}
......@@ -284,6 +286,8 @@ void XRWebGLDrawingBuffer::DoneWithSharedBuffer() {
shared_buffer_texture_id_ = 0;
DrawingBuffer::Client* client = drawing_buffer_->client();
if (!client)
return;
client->DrawingBufferClientRestoreFramebufferBinding();
}
......
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