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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 15743022: Fix potential NULL pointer in LayerTreeHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Dana comments 1 Created 7 years, 7 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 | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index f58f3c2d7add8598fe445712494c94050ceaebcd..cb39e90a37679963744a509ee167651cf61305de 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2202,10 +2202,10 @@ scoped_ptr<base::Value> LayerTreeHostImpl::AsValue() const {
}
scoped_ptr<base::Value> LayerTreeHostImpl::ActivationStateAsValue() const {
- DCHECK(pending_tree_ && tile_manager_);
scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
state->Set("lthi", TracedValue::CreateIDRef(this).release());
- state->Set("tile_manager", tile_manager_->BasicStateAsValue().release());
+ if (tile_manager_)
+ state->Set("tile_manager", tile_manager_->BasicStateAsValue().release());
return state.PassAs<base::Value>();
}
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698