Bug 767996 - Add null check to nsSVGUtils::InvalidateBounds. r=me.

This commit is contained in:
Jonathan Watt 2012-06-25 16:17:42 +01:00
Родитель 88375990c3
Коммит d3ac52e321
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -701,6 +701,12 @@ nsSVGUtils::InvalidateBounds(nsIFrame *aFrame, bool aDuringUpdate,
aFrame = aFrame->GetParent();
}
if (!aFrame) {
// We seem to be able to get here, even though SVG frames are never created
// without an ancestor nsSVGOuterSVGFrame. See bug 767996.
return;
}
NS_ASSERTION(aFrame->GetStateBits() & NS_STATE_IS_OUTER_SVG,
"SVG frames must always have an nsSVGOuterSVGFrame ancestor!");
invalidArea.MoveBy(aFrame->GetContentRect().TopLeft() - aFrame->GetPosition());