From c20d4dc2d3c818cdd466f2991d9df9f45c99c2e3 Mon Sep 17 00:00:00 2001 From: "racham%netscape.com" Date: Thu, 3 Feb 2000 06:36:50 +0000 Subject: [PATCH] Trying to access the global history prematurely in putting up the profile dialogues. Removing assertion and adding check on null pointer. r=travis git-svn-id: svn://10.0.0.236/trunk@59626 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 4 ++-- mozilla/webshell/src/nsWebShell.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index ee0f4f3a46c..e3b205c3afa 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -4135,8 +4135,8 @@ NS_IMETHODIMP nsWebShell::SetTitle(const PRUnichar* aTitle) // Oh this hack sucks. But there isn't any other way that I can // reliably get the title text. Sorry. nsCOMPtr globalHistory(do_GetService("component://netscape/browser/global-history")); - NS_ENSURE_TRUE(globalHistory, NS_ERROR_FAILURE); - globalHistory->SetPageTitle(nsCAutoString(mURL), aTitle); + if (globalHistory) + globalHistory->SetPageTitle(nsCAutoString(mURL), aTitle); return NS_OK; } diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index ee0f4f3a46c..e3b205c3afa 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -4135,8 +4135,8 @@ NS_IMETHODIMP nsWebShell::SetTitle(const PRUnichar* aTitle) // Oh this hack sucks. But there isn't any other way that I can // reliably get the title text. Sorry. nsCOMPtr globalHistory(do_GetService("component://netscape/browser/global-history")); - NS_ENSURE_TRUE(globalHistory, NS_ERROR_FAILURE); - globalHistory->SetPageTitle(nsCAutoString(mURL), aTitle); + if (globalHistory) + globalHistory->SetPageTitle(nsCAutoString(mURL), aTitle); return NS_OK; }