summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 3de630b..1c79b39b 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2753,7 +2753,10 @@ void GLES2DecoderImpl::Destroy(bool have_context) {
bound_renderbuffer_ = NULL;
if (have_context) {
- copy_texture_CHROMIUM_->Destroy();
+ if (copy_texture_CHROMIUM_.get()) {
+ copy_texture_CHROMIUM_->Destroy();
+ copy_texture_CHROMIUM_.reset();
+ }
if (current_program_) {
program_manager()->UnuseProgram(shader_manager(), current_program_);