Bug 576802 - Fix crash with gradientTransform animate. r=jwatt

This commit is contained in:
Robert Longson 2010-07-12 20:17:17 +01:00
Родитель 145838a49b
Коммит a2fd96954a
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -1953,6 +1953,8 @@ nsSVGElement::GetAnimatedAttr(nsIAtom* aName)
if (aName == nsGkAtoms::gradientTransform) {
nsCOMPtr<nsIDOMSVGGradientElement> gradientElement(
do_QueryInterface(static_cast<nsIContent*>(this)));
if (!gradientElement)
return nsnull;
nsresult rv = gradientElement->GetGradientTransform(getter_AddRefs(transformList));
NS_ENSURE_SUCCESS(rv, nsnull);
@ -1960,6 +1962,8 @@ nsSVGElement::GetAnimatedAttr(nsIAtom* aName)
if (aName == nsGkAtoms::patternTransform) {
nsCOMPtr<nsIDOMSVGPatternElement> patternElement(
do_QueryInterface(static_cast<nsIContent*>(this)));
if (!patternElement)
return nsnull;
nsresult rv = patternElement->GetPatternTransform(getter_AddRefs(transformList));
NS_ENSURE_SUCCESS(rv, nsnull);