From 5ad0fe118baf5694fc5d4788d3aa96f15cd2b3b5 Mon Sep 17 00:00:00 2001 From: "bsmedberg%covad.net" Date: Fri, 21 Jan 2005 02:17:01 +0000 Subject: [PATCH] bug 279164 - Links opened from remote apps (using DDE) don't open the URI. r=bryner --- toolkit/components/commandlines/src/nsCommandLine.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/toolkit/components/commandlines/src/nsCommandLine.cpp b/toolkit/components/commandlines/src/nsCommandLine.cpp index 488faef6c955..96a0f7ac348e 100644 --- a/toolkit/components/commandlines/src/nsCommandLine.cpp +++ b/toolkit/components/commandlines/src/nsCommandLine.cpp @@ -384,8 +384,6 @@ nsCommandLine::ResolveURI(const nsAString& aArgument, nsIURI* *aResult) { nsresult rv; - NS_ENSURE_TRUE(mWorkingDir, NS_ERROR_NOT_INITIALIZED); - // First, we try to init the argument as an absolute file path. If this doesn't // work, it is an absolute or relative URI. @@ -400,8 +398,9 @@ nsCommandLine::ResolveURI(const nsAString& aArgument, nsIURI* *aResult) } nsCOMPtr workingDirURI; - rv = io->NewFileURI(mWorkingDir, getter_AddRefs(workingDirURI)); - NS_ENSURE_SUCCESS(rv, rv); + if (mWorkingDir) { + io->NewFileURI(mWorkingDir, getter_AddRefs(workingDirURI)); + } return io->NewURI(NS_ConvertUTF16toUTF8(aArgument), nsnull,