diff --git a/mozilla/layout/svg/base/src/nsSVGUseFrame.cpp b/mozilla/layout/svg/base/src/nsSVGUseFrame.cpp index 299dd3491d3..f1b4dedb8ea 100644 --- a/mozilla/layout/svg/base/src/nsSVGUseFrame.cpp +++ b/mozilla/layout/svg/base/src/nsSVGUseFrame.cpp @@ -149,9 +149,9 @@ nsSVGUseFrame::AttributeChanged(PRInt32 aNameSpaceID, void nsSVGUseFrame::Destroy() { - nsSVGUseElement *use = NS_STATIC_CAST(nsSVGUseElement*, mContent); - use->DestroyAnonymousContent(); + nsRefPtr use = NS_STATIC_CAST(nsSVGUseElement*, mContent); nsSVGUseFrameBase::Destroy(); + use->DestroyAnonymousContent(); }