Index: ui/gfx/paint_vector_icon.cc |
diff --git a/ui/gfx/paint_vector_icon.cc b/ui/gfx/paint_vector_icon.cc |
index 7121fde314d5a6933fd93de8c7773f26c82ceac3..438e46e76f5fe01b44ba206701d207234f1dccfd 100644 |
--- a/ui/gfx/paint_vector_icon.cc |
+++ b/ui/gfx/paint_vector_icon.cc |
@@ -311,7 +311,8 @@ class VectorIconSource : public CanvasImageSource { |
// CanvasImageSource: |
void Draw(gfx::Canvas* canvas) override { |
if (path_.empty()) { |
- PaintVectorIcon(canvas, id_, size_.width(), color_); |
+ if (id_ != VectorIconId::VECTOR_ICON_NONE) |
+ PaintVectorIcon(canvas, id_, size_.width(), color_); |
if (badge_id_ != VectorIconId::VECTOR_ICON_NONE) |
PaintVectorIcon(canvas, badge_id_, size_.width(), color_); |
} else { |
@@ -385,7 +386,7 @@ void PaintVectorIcon(Canvas* canvas, |
VectorIconId id, |
size_t dip_size, |
SkColor color) { |
- DCHECK(VectorIconId::VECTOR_ICON_NONE != id); |
+ DCHECK(id != VectorIconId::VECTOR_ICON_NONE); |
danakj
2016/03/25 23:35:28
DCHECK_NE if you can
Peter Kasting
2016/03/26 01:01:57
Can't (I tried that first); no operator<< for this
|
const PathElement* path = canvas->image_scale() == 1.f |
? GetPathForVectorIconAt1xScale(id) |
: GetPathForVectorIcon(id); |