[Webkit-unassigned] [Bug 25105] isOutermostSVG() crashes with null deref

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 8 17:55:03 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=25105


simon.fraser at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eric at webkit.org




------- Comment #2 from simon.fraser at apple.com  2009-04-08 17:55 PDT -------
Maybe fix:
diff --git a/WebCore/svg/SVGSVGElement.cpp b/WebCore/svg/SVGSVGElement.cpp
index e66a16e..fe09148 100644
--- a/WebCore/svg/SVGSVGElement.cpp
+++ b/WebCore/svg/SVGSVGElement.cpp
@@ -477,6 +477,10 @@ bool SVGSVGElement::hasRelativeValues() const

 bool SVGSVGElement::isOutermostSVG() const
 {
+    // Element may not be in the document.
+    if (!parentNode())
+        return false;
+
     // This is true whenever this is the outermost SVG, even if there are HTML
elements outside it
     return !parentNode()->isSVGElement();
 }


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list