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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 203293005: Fix crash in 2D canvas drawSystemFocusRing with invalid argument. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « LayoutTests/fast/canvas/draw-system-focus-ring-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index ef14b3f8911c4d39d749f93a67782f4f382cc767..307b2946078a608683ca101d0ac664b34f4e9458 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -2238,7 +2238,7 @@ bool CanvasRenderingContext2D::focusRingCallIsValid(const Path& path, Element* e
return false;
if (path.isEmpty())
return false;
- if (!element->isDescendantOf(canvas()))
+ if (!element || !element->isDescendantOf(canvas()))
return false;
return true;
« no previous file with comments | « LayoutTests/fast/canvas/draw-system-focus-ring-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698