Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1033093002: Only destroy GPUTracer if the pointer is not empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2d6425cc5d3e156b560154c592ed9431f5ce9e9f..d24339b3ee6228b90f094ca62012554f5c226a94 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3756,8 +3756,10 @@ void GLES2DecoderImpl::Destroy(bool have_context) {
async_pixel_transfer_manager_.reset();
// Destroy the GPU Tracer which may own some in process GPU Timings.
- gpu_tracer_->Destroy(have_context);
- gpu_tracer_ = NULL;
+ if (gpu_tracer_.get()) {
Vitaly Buka (NO REVIEWS) 2015/03/26 22:13:41 if (gpu_tracer_) {
David Yen 2015/03/26 22:18:28 Done.
+ gpu_tracer_->Destroy(have_context);
+ gpu_tracer_ = NULL;
Vitaly Buka (NO REVIEWS) 2015/03/26 22:13:41 gpi_tracer_.reset()
David Yen 2015/03/26 22:18:28 Done.
+ }
if (group_.get()) {
framebuffer_manager()->RemoveObserver(this);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698