Commit 89fcb8e8 by Milan Sreckovic Committed by Commit Bot

Check for getColorAttachment returning null before using it.

BUG=angleproject:1916 Change-Id: I98413198089081cc354e9e14dff95f233c3f34ff Reviewed-on: https://chromium-review.googlesource.com/446044Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent c16678a2
......@@ -182,7 +182,10 @@ gl::Error Framebuffer11::invalidateBase(size_t count, const GLenum *attachments,
size_t colorIndex =
(attachments[i] == GL_COLOR ? 0u : (attachments[i] - GL_COLOR_ATTACHMENT0));
auto colorAttachment = mState.getColorAttachment(colorIndex);
ANGLE_TRY(invalidateAttachment(colorAttachment));
if (colorAttachment)
{
ANGLE_TRY(invalidateAttachment(colorAttachment));
}
break;
}
}
......
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