Index: ui/gfx/canvas.cc |
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc |
index db8b28fc0a95d78aac894b8956ebc60651f68e69..e8d6a9166fb1136c5d94fca30912b80f137a01be 100644 |
--- a/ui/gfx/canvas.cc |
+++ b/ui/gfx/canvas.cc |
@@ -131,6 +131,8 @@ ImageSkiaRep Canvas::ExtractImageRep() const { |
} |
void Canvas::DrawDashedRect(const Rect& rect, SkColor color) { |
+ if (rect.IsEmpty()) |
+ return; |
// Create a 2D bitmap containing alternating on/off pixels - we do this |
// so that you never get two pixels of the same color around the edges |
// of the focus rect (this may mean that opposing edges of the rect may |