From 74a71da6f752acc574424a81408cf62db93b12c3 Mon Sep 17 00:00:00 2001 From: Robert Longson Date: Wed, 9 Jun 2010 20:13:03 +0100 Subject: [PATCH] Bug 569463 - Stop coverity complaining about GetParsedAttr call in RebuildPathAndVerticesFromMpathElem. r=jwatt --- content/svg/content/src/SVGMotionSMILAnimationFunction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/svg/content/src/SVGMotionSMILAnimationFunction.cpp b/content/svg/content/src/SVGMotionSMILAnimationFunction.cpp index ee8ddb5e31b8..6708fe66f034 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(