Index: gpu/command_buffer/tests/gl_manager.cc |
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc |
index 8988349eaa4be81a22f38e1b44edd5c6d2e46d01..23779ea8f3041b6ac59ac734ad5f0bd228b03cba 100644 |
--- a/gpu/command_buffer/tests/gl_manager.cc |
+++ b/gpu/command_buffer/tests/gl_manager.cc |
@@ -404,8 +404,8 @@ void GLManager::Destroy() { |
gles2_helper_.reset(); |
command_buffer_.reset(); |
if (decoder_.get()) { |
- decoder_->MakeCurrent(); |
- decoder_->Destroy(true); |
+ bool have_context = decoder_->GetGLContext()->MakeCurrent(surface_.get()); |
+ decoder_->Destroy(have_context); |
decoder_.reset(); |
} |
} |