Commit 23521ca3 by Jeff Gilbert Committed by Commit Bot

Validate `context` before use in ValidateStreamConsumerGLTextureExternalAttribsNV.

Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1608235 Bug: angleproject:4333 Change-Id: I957b6412f7c744e4bbaa7d8084b3c81ee58d45ca Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2015838Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent e93a438b
...@@ -2860,6 +2860,8 @@ Error ValidateStreamConsumerGLTextureExternalAttribsNV(const Display *display, ...@@ -2860,6 +2860,8 @@ Error ValidateStreamConsumerGLTextureExternalAttribsNV(const Display *display,
return EglBadAccess() << "Stream consumer extension not active"; return EglBadAccess() << "Stream consumer extension not active";
} }
ANGLE_TRY(ValidateContext(display, context));
// Although technically not a requirement in spec, the context needs to be checked for support // Although technically not a requirement in spec, the context needs to be checked for support
// for external textures or future logic will cause assertations. This extension is also // for external textures or future logic will cause assertations. This extension is also
// effectively useless without external textures. // effectively useless without external textures.
...@@ -2873,13 +2875,6 @@ Error ValidateStreamConsumerGLTextureExternalAttribsNV(const Display *display, ...@@ -2873,13 +2875,6 @@ Error ValidateStreamConsumerGLTextureExternalAttribsNV(const Display *display,
return EglBadStream() << "Invalid stream"; return EglBadStream() << "Invalid stream";
} }
if (!context)
{
return EglBadAccess() << "No GL context current to calling thread.";
}
ANGLE_TRY(ValidateContext(display, context));
if (stream->getState() != EGL_STREAM_STATE_CREATED_KHR) if (stream->getState() != EGL_STREAM_STATE_CREATED_KHR)
{ {
return EglBadState() << "Invalid stream state"; return EglBadState() << "Invalid stream state";
......
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