Bug 338281 - Properly invalidate path when parsing fails. r+sr=roc

git-svn-id: svn://10.0.0.236/trunk@198113 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tor%cs.brown.edu 2006-05-21 13:50:39 +00:00
parent 69bb284c46
commit a3050ba62b
2 changed files with 3 additions and 3 deletions

View File

@ -1144,6 +1144,8 @@ nsSVGPathDataParserToInternal::Parse(const nsAString &aValue)
mPrevSeg = nsIDOMSVGPathSeg::PATHSEG_UNKNOWN;
nsresult rv = nsSVGPathDataParser::Parse(aValue);
if (NS_FAILED(rv))
mPathData->Clear();
PathFini();

View File

@ -342,9 +342,7 @@ nsSVGPathElement::BeforeSetAttr(PRInt32 aNamespaceID, nsIAtom* aName,
}
nsSVGPathDataParserToInternal parser(&mPathData);
nsresult rv = parser.Parse(*aValue);
NS_ENSURE_SUCCESS(rv, rv);
parser.Parse(*aValue);
}
return nsSVGPathElementBase::BeforeSetAttr(aNamespaceID, aName,