From a0f7e77d379b81cc268a54d7c771fc44a4c13d32 Mon Sep 17 00:00:00 2001 From: "hpradhan%hotpop.com" Date: Sun, 5 Jan 2003 06:34:53 +0000 Subject: [PATCH] bug 186509 r=caillon sr=jst --- dom/src/base/nsLocation.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dom/src/base/nsLocation.cpp b/dom/src/base/nsLocation.cpp index 461d7ea0091f..d7078504fc00 100644 --- a/dom/src/base/nsLocation.cpp +++ b/dom/src/base/nsLocation.cpp @@ -217,6 +217,12 @@ LocationImpl::GetURI(nsIURI** aURI) rv = webNav->GetCurrentURI(getter_AddRefs(uri)); NS_ENSURE_SUCCESS(rv, rv); + // It is valid for docshell to return a null URI. Don't try to fixup + // if this happens. + if (!uri) { + return NS_OK; + } + nsCOMPtr urifixup(do_GetService(NS_URIFIXUP_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv);