Commit 4596a769 by Corentin Wallez Committed by Commit Bot

FramebufferGL: fix a crash when there is no color buffer.

BUG=chromium:675819 Change-Id: I7d143ba51bb16f28b145aa2b0410929d29e0b464 Reviewed-on: https://chromium-review.googlesource.com/422493Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
parent d9019838
...@@ -289,7 +289,12 @@ Error FramebufferGL::blit(ContextImpl *context, ...@@ -289,7 +289,12 @@ Error FramebufferGL::blit(ContextImpl *context,
const Framebuffer *destFramebuffer = context->getGLState().getDrawFramebuffer(); const Framebuffer *destFramebuffer = context->getGLState().getDrawFramebuffer();
const FramebufferAttachment *colorReadAttachment = sourceFramebuffer->getReadColorbuffer(); const FramebufferAttachment *colorReadAttachment = sourceFramebuffer->getReadColorbuffer();
GLsizei readAttachmentSamples = colorReadAttachment->getSamples();
GLsizei readAttachmentSamples = 0;
if (colorReadAttachment != nullptr)
{
readAttachmentSamples = colorReadAttachment->getSamples();
}
bool needManualColorBlit = false; bool needManualColorBlit = false;
......
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