Commit 3feb3ff5 by Geoff Lang Committed by Commit Bot

Fix handling of null data pointers for robust tex image calls.

BUG=angleproject:1354 Change-Id: I596ebd6d8d4d500942eeb31629113b0686933531 Reviewed-on: https://chromium-review.googlesource.com/403537Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 449a8030
......@@ -1565,9 +1565,10 @@ bool ValidImageDataSize(ValidationContext *context,
{
context->handleError(
Error(GL_INVALID_OPERATION, "imageSize must be 0 if no texture data is provided."));
return false;
}
if (endByte > static_cast<GLuint>(imageSize))
if (pixels != nullptr && endByte > static_cast<GLuint>(imageSize))
{
context->handleError(
Error(GL_INVALID_OPERATION, "imageSize must be at least %u.", endByte));
......
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