Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
index b2f7f96963843b8f1843c07ea9003cb703ef25a9..34ddc02171a0ff5e89669900151afc3dc263bb35 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
@@ -12839,6 +12839,13 @@ void GLES2DecoderImpl::DoCopyTextureCHROMIUM( |
TextureRef* source_texture_ref = GetTexture(source_id); |
TextureRef* dest_texture_ref = GetTexture(dest_id); |
+ |
+ if (!source_texture_ref || !dest_texture_ref) { |
+ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCopySubTextureCHROMIUM", |
+ "unknown texture ids"); |
+ return; |
+ } |
+ |
Texture* source_texture = source_texture_ref->texture(); |
Texture* dest_texture = dest_texture_ref->texture(); |
int source_width = 0; |
@@ -12997,6 +13004,13 @@ void GLES2DecoderImpl::DoCopySubTextureCHROMIUM( |
TextureRef* source_texture_ref = GetTexture(source_id); |
TextureRef* dest_texture_ref = GetTexture(dest_id); |
+ |
+ if (!source_texture_ref || !dest_texture_ref) { |
+ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCopySubTextureCHROMIUM", |
+ "unknown texture ids"); |
+ return; |
+ } |
+ |
Texture* source_texture = source_texture_ref->texture(); |
Texture* dest_texture = dest_texture_ref->texture(); |
int source_width = 0; |
@@ -13143,6 +13157,13 @@ void GLES2DecoderImpl::DoCompressedCopyTextureCHROMIUM(GLenum target, |
TextureRef* source_texture_ref = GetTexture(source_id); |
TextureRef* dest_texture_ref = GetTexture(dest_id); |
+ |
+ if (!source_texture_ref || !dest_texture_ref) { |
+ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedCopyTextureCHROMIUM", |
+ "unknown texture ids"); |
+ return; |
+ } |
+ |
Texture* source_texture = source_texture_ref->texture(); |
Texture* dest_texture = dest_texture_ref->texture(); |
int source_width = 0; |
@@ -13319,6 +13340,13 @@ void GLES2DecoderImpl::DoCompressedCopySubTextureCHROMIUM(GLenum target, |
TextureRef* source_texture_ref = GetTexture(source_id); |
TextureRef* dest_texture_ref = GetTexture(dest_id); |
+ |
+ if (!source_texture_ref || !dest_texture_ref) { |
+ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedCopySubTextureCHROMIUM", |
+ "unknown texture ids"); |
+ return; |
+ } |
+ |
Texture* source_texture = source_texture_ref->texture(); |
Texture* dest_texture = dest_texture_ref->texture(); |
int source_width = 0; |