diff --git a/content/base/crashtests/658845-1.svg b/content/base/crashtests/658845-1.svg new file mode 100644 index 000000000000..40a6a3167c5a --- /dev/null +++ b/content/base/crashtests/658845-1.svg @@ -0,0 +1,3 @@ + + + diff --git a/content/base/crashtests/crashtests.list b/content/base/crashtests/crashtests.list index 1014af154939..837ac863b1d6 100644 --- a/content/base/crashtests/crashtests.list +++ b/content/base/crashtests/crashtests.list @@ -90,3 +90,4 @@ load 637214-1.svg load 637214-2.svg load 642022-1.html load 646184.html +load 658845-1.svg diff --git a/content/base/src/nsReferencedElement.cpp b/content/base/src/nsReferencedElement.cpp index 585f7c06bf4d..01c404408f69 100644 --- a/content/base/src/nsReferencedElement.cpp +++ b/content/base/src/nsReferencedElement.cpp @@ -52,10 +52,12 @@ nsReferencedElement::Reset(nsIContent* aFromContent, nsIURI* aURI, PRBool aWatch, PRBool aReferenceImage) { NS_ABORT_IF_FALSE(aFromContent, "Reset() expects non-null content pointer"); - NS_ABORT_IF_FALSE(aURI, "Reset() expects non-null URI for referenced elem"); Unlink(); + if (!aURI) + return; + nsCAutoString refPart; aURI->GetRef(refPart); // Unescape %-escapes in the reference. The result will be in the