From 22b11a8c5fad8aa0d316a68fb546d4ade1f08287 Mon Sep 17 00:00:00 2001 From: Christoph Kerschbaumer Date: Fri, 18 Mar 2016 14:05:55 -0700 Subject: [PATCH] Bug 1257730 - Fix ping when no URI is available. r=sicking --- docshell/base/nsDocShell.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 6ccc841e6c3a..eb5bc4f0c2a4 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -375,7 +375,10 @@ ForEachPing(nsIContent* aContent, ForEachPingCallback aCallback, void* aClosure) ios->NewURI(NS_ConvertUTF16toUTF8(tokenizer.nextToken()), doc->GetDocumentCharacterSet().get(), baseURI, getter_AddRefs(uri)); - + // if we can't generate a valid URI, then there is nothing to do + if (!uri) { + continue; + } // Explicitly not allow loading data: URIs bool isDataScheme = (NS_SUCCEEDED(uri->SchemeIs("data", &isDataScheme)) && isDataScheme);