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

Unified Diff: cc/layers/nine_patch_layer_impl.cc

Issue 22911024: Fix crashes when NinePatchLayer doesn't have a resource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shadow
Patch Set: Move needs_push_properties_ from Update to PPT Created 7 years, 4 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 | « cc/layers/nine_patch_layer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/nine_patch_layer_impl.cc
diff --git a/cc/layers/nine_patch_layer_impl.cc b/cc/layers/nine_patch_layer_impl.cc
index 103f7656eb85c5ad24212f680306ce1ed9e4b507..4274bf00af17da64a015880563c700c9f324df80 100644
--- a/cc/layers/nine_patch_layer_impl.cc
+++ b/cc/layers/nine_patch_layer_impl.cc
@@ -64,12 +64,13 @@ bool NinePatchLayerImpl::WillDraw(DrawMode draw_mode,
void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink,
AppendQuadsData* append_quads_data) {
- DCHECK(resource_id_);
-
SharedQuadState* shared_quad_state =
quad_sink->UseSharedQuadState(CreateSharedQuadState());
AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data);
+ if (!resource_id_)
+ return;
+
static const bool flipped = false;
static const bool premultiplied_alpha = true;
« no previous file with comments | « cc/layers/nine_patch_layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698