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

Unified Diff: Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 1288063010: Adding nullptr check in CanvasRenderingContext2D::draw (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: build fix Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698