diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2018-04-09 11:46:12 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-04-09 11:46:12 +0200 |
commit | 68898f4ebd1a9112b7281ec766a725e24c62205e (patch) | |
tree | 64318d070d36b80e5f08758ac4257b57313a19df | |
parent | e460b4ab8a9abfe70d0cac9cf03160510f791b7c (diff) | |
download | servo-68898f4ebd1a9112b7281ec766a725e24c62205e.tar.gz servo-68898f4ebd1a9112b7281ec766a725e24c62205e.zip |
Fix the error emitted for invalid targets in WebGLTexture::bind
It doesn't actually matter because this is only called from
WebGLRenderingContext::BindTexture, which already checks the target,
but better be safe than sorry.
-rw-r--r-- | components/script/dom/webgltexture.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/webgltexture.rs b/components/script/dom/webgltexture.rs index ef980c75211..45b26997bc3 100644 --- a/components/script/dom/webgltexture.rs +++ b/components/script/dom/webgltexture.rs @@ -109,7 +109,7 @@ impl WebGLTexture { let face_count = match target { constants::TEXTURE_2D => 1, constants::TEXTURE_CUBE_MAP => 6, - _ => return Err(WebGLError::InvalidOperation) + _ => return Err(WebGLError::InvalidEnum) }; self.face_count.set(face_count); self.target.set(Some(target)); |