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

Unified Diff: Source/WebCore/svg/SVGViewSpec.cpp

Issue 12562002: Merge 145013 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 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 | « Source/WebCore/ChangeLog ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/svg/SVGViewSpec.cpp
===================================================================
--- Source/WebCore/svg/SVGViewSpec.cpp (revision 145015)
+++ Source/WebCore/svg/SVGViewSpec.cpp (working copy)
@@ -142,7 +142,10 @@
{
if (!m_contextElement)
return 0;
- return static_cast<SVGElement*>(m_contextElement->treeScope()->getElementById(m_viewTargetString));
+ Element* element = m_contextElement->treeScope()->getElementById(m_viewTargetString);
+ if (!element || !element->isSVGElement())
+ return 0;
+ return static_cast<SVGElement*>(element);
}
SVGTransformListPropertyTearOff* SVGViewSpec::transform()
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698