From 383de920a16e572f8b8415e58c6ff3e70309cd0e Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 21 Feb 2006 00:09:34 +0000 Subject: [PATCH] Actually address the review comment too. Bug 324601. --- extensions/xmlextras/base/src/nsXMLHttpRequest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp b/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp index 9be9b82e2bac..1d250041bc68 100644 --- a/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp +++ b/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp @@ -1241,7 +1241,11 @@ nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt) // is sane, I guess. nsCOMPtr doc = GetDocumentFromScriptContext(mScriptContext); nsIURI* uri = GetBaseURI(); - privImpl->Init(uri, uri, doc->GetNodePrincipal()); + nsIPrincipal* principal = nsnull; + if (doc) { + principal = doc->GetNodePrincipal(); + } + privImpl->Init(uri, uri, principal); } // Create an empty document from it (resets current document as well)