Index: cc/tiles/gpu_image_decode_controller.cc |
diff --git a/cc/tiles/gpu_image_decode_controller.cc b/cc/tiles/gpu_image_decode_controller.cc |
index b6daab4ccfeac4a8a627aa6973ee84438ee20dc7..4dd75959d123857bfab625b520c9c6bbf1da10be 100644 |
--- a/cc/tiles/gpu_image_decode_controller.cc |
+++ b/cc/tiles/gpu_image_decode_controller.cc |
@@ -110,7 +110,11 @@ class ImageUploadTaskImpl : public TileTask { |
image_ref_(skia::SharePtr(draw_image.image())), |
source_prepare_tiles_id_(source_prepare_tiles_id) { |
DCHECK(!SkipImage(draw_image)); |
- dependencies_.push_back(std::move(decode_dependency)); |
+ // For already-uploaded image, ImageDecodeTaskImpl is not created. The |
+ // ImageUploadTaskImpl should hold valid decode dependency in |
+ // |dependencies_|. |
+ if (decode_dependency.get()) |
+ dependencies_.push_back(std::move(decode_dependency)); |
} |
// Override from Task: |