Index: Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
diff --git a/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
index 41d48fe8be8d093508a6b6f92642f749708b670b..2834b4e063dc7c9f171f5320aa9c8581b8bd700b 100644 |
--- a/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
+++ b/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
@@ -885,7 +885,7 @@ bool CanvasRenderingContext2D::draw(const DrawFunc& drawFunc, const ContainsFunc |
return false; |
SkIRect clipBounds; |
- if (!drawingCanvas()->getClipDeviceBounds(&clipBounds)) |
+ if (!drawingCanvas() || !drawingCanvas()->getClipDeviceBounds(&clipBounds)) |
return false; |
// If gradient size is zero, then paint nothing. |