diff --git a/content/svg/content/src/nsSVGTransformList.cpp b/content/svg/content/src/nsSVGTransformList.cpp index 3b6090a6bf8..580303bd458 100644 --- a/content/svg/content/src/nsSVGTransformList.cpp +++ b/content/svg/content/src/nsSVGTransformList.cpp @@ -180,8 +180,7 @@ nsSVGTransformList::SetValueString(const nsAString& aValue) if (NS_FAILED(rv)) { // there was a parse error. rv = NS_ERROR_DOM_SYNTAX_ERR; - } - else { + } else { WillModify(); ReleaseTransforms(); PRInt32 count = xforms.Count(); @@ -235,6 +234,9 @@ NS_IMETHODIMP nsSVGTransformList::GetNumberOfItems(PRUint32 *aNumberOfItems) /* void clear (); */ NS_IMETHODIMP nsSVGTransformList::Clear() { + if (mTransforms.IsEmpty()) { + return NS_OK; + } WillModify(); ReleaseTransforms(); DidModify(); diff --git a/layout/svg/crashtests/648819-1.html b/layout/svg/crashtests/648819-1.html new file mode 100644 index 00000000000..727ca3e55f7 --- /dev/null +++ b/layout/svg/crashtests/648819-1.html @@ -0,0 +1,6 @@ + + diff --git a/layout/svg/crashtests/crashtests.list b/layout/svg/crashtests/crashtests.list index 9d6155c4a60..91b71096d09 100644 --- a/layout/svg/crashtests/crashtests.list +++ b/layout/svg/crashtests/crashtests.list @@ -105,3 +105,4 @@ load 612662-2.svg load 614367-1.svg load 620034-1.html load 621598-1.svg +load 648819-1.html