diff --git a/content/svg/content/src/SVGMotionSMILAnimationFunction.cpp b/content/svg/content/src/SVGMotionSMILAnimationFunction.cpp index ee8ddb5e31b..6708fe66f03 100644 --- a/content/svg/content/src/SVGMotionSMILAnimationFunction.cpp +++ b/content/svg/content/src/SVGMotionSMILAnimationFunction.cpp @@ -253,9 +253,9 @@ SVGMotionSMILAnimationFunction:: // Use the path that's the target of our chosen child. nsSVGPathElement* pathElem = aMpathElem->GetReferencedPath(); if (pathElem) { - if (pathElem->HasAttr(kNameSpaceID_None, nsGkAtoms::d)) { - const nsAString& pathSpec = - pathElem->GetParsedAttr(nsGkAtoms::d)->GetStringValue(); + const nsAttrValue* value = pathElem->GetParsedAttr(nsGkAtoms::d); + if (value) { + const nsAString& pathSpec = value->GetStringValue(); nsresult rv = SetPathVerticesFromPathString(pathSpec); if (NS_SUCCEEDED(rv)) { mPath = pathElem->GetFlattenedPath(